Skip to content

Commit

Permalink
chore: use machete instead of udeps in CI (#311)
Browse files Browse the repository at this point in the history
Signed-off-by: Dori Medini <[email protected]>
  • Loading branch information
dorimedini-starkware authored Jul 16, 2024
1 parent 7dae032 commit 38870f3
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 14 deletions.
17 changes: 3 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions crates/committer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
5 changes: 5 additions & 0 deletions crates/committer_cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]

0 comments on commit 38870f3

Please sign in to comment.