Improvement proposal #3
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI builds | |
on: | |
workflow_call: {} | |
pull_request: {} | |
push: | |
branches: [ master ] | |
paths: [ src ] | |
env: | |
RUSTC_WRAPPER: "sccache" | |
RUSTFLAGS: "-Dwarnings" | |
SCCACHE_GHA_ENABLED: "true" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install rust toolchain | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
components: clippy | |
- uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
- name: Run sccache-cache | |
uses: mozilla-actions/sccache-action@v0.0.5 | |
- name: Check formatting | |
run: cargo fmt --all --check | |
- name: Run clippy | |
run: cargo clippy --all-targets | |
- name: Install cargo-binstall | |
uses: cargo-bins/cargo-binstall@main | |
- name: Install cargo-machete | |
run: cargo binstall cargo-machete --no-confirm | |
- name: Check for unused deps | |
run: cargo machete --with-metadata | |
- name: Compile tests | |
run: cargo test --no-run --locked | |
- name: Run tests | |
run: cargo test -- --nocapture --quiet |