diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f67d90a4..5b68546a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -149,7 +149,7 @@ jobs: with: clean: false - run: echo "NEW_BENCH_INPUT_FILES_PREFIX=$(cat ./crates/committer_cli/src/tests/flow_test_files_prefix)" >> $GITHUB_ENV - + # Input files didn't change. - if: env.OLD_BENCH_INPUT_FILES_PREFIX == env.NEW_BENCH_INPUT_FILES_PREFIX run: | @@ -222,19 +222,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@master - name: "Rust Toolchain Setup" - with: - toolchain: nightly-2024-01-12 - - uses: Swatinem/rust-cache@v2 - id: "cache-cargo" - - if: ${{ steps.cache-cargo.outputs.cache-hit != 'true' }} - name: "Download and run cargo-udeps" - run: | - wget -O - -c https://github.com/est31/cargo-udeps/releases/download/v0.1.45/cargo-udeps-v0.1.45-x86_64-unknown-linux-gnu.tar.gz | tar -xz - cargo-udeps-*/cargo-udeps udeps - env: - RUSTUP_TOOLCHAIN: nightly-2024-01-12 + - name: Run Machete (detect unused dependencies) + uses: bnjbvr/cargo-machete@main all-tests: runs-on: ubuntu-latest diff --git a/crates/committer/Cargo.toml b/crates/committer/Cargo.toml index fb5367a8..09f46dd9 100644 --- a/crates/committer/Cargo.toml +++ b/crates/committer/Cargo.toml @@ -32,3 +32,8 @@ strum.workspace = true strum_macros.workspace = true thiserror.workspace = true tokio.workspace = true + +# Optional dependencies required for tests and the testing feature. +# See [here](https://github.com/bnjbvr/cargo-machete/issues/128). +[package.metadata.cargo-machete] +ignored = ["strum"] diff --git a/crates/committer_cli/Cargo.toml b/crates/committer_cli/Cargo.toml index f2af50f3..7cfa6757 100644 --- a/crates/committer_cli/Cargo.toml +++ b/crates/committer_cli/Cargo.toml @@ -37,3 +37,8 @@ tokio.workspace = true harness = false name = "committer_bench" path = "benches/committer_bench.rs" + +# Optional dependencies required for tests and the testing feature. +# See [here](https://github.com/bnjbvr/cargo-machete/issues/128). +[package.metadata.cargo-machete] +ignored = ["hex", "strum_macros"]