Skip to content

Commit

Permalink
Run cargo machete in CI and on just lint.
Browse files Browse the repository at this point in the history
  • Loading branch information
SamirTalwar committed Mar 11, 2024
1 parent 0173b82 commit 170a927
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 164 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/machete.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: find unused dependencies

on:
push:

jobs:
cargo-machete:
name: find unused dependencies with cargo machete
runs-on: ubuntu-latest
env:
CARGO_NET_GIT_FETCH_WITH_CLI: "true"
RUSTFLAGS: "-D warnings" # fail on warnings
steps:
- uses: actions/checkout@v4

- name: install tools
run: |
rustup show
cargo install cargo-machete
- uses: Swatinem/rust-cache@v2
with:
shared-key: "build" # share the cache across jobs
save-if: false

- name: find unused dependencies
run: |
cargo machete --with-metadata
1 change: 1 addition & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:
- uses: Swatinem/rust-cache@v2
with:
shared-key: "build" # share the cache across jobs
save-if: false

- name: run tests
run: cargo test --release --all-targets --all-features
Loading

0 comments on commit 170a927

Please sign in to comment.