Skip to content

Commit 14c26d4

Browse files
committed
ci: use machete to check for unused deps
1 parent 1ee60a9 commit 14c26d4

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

.github/workflows/testing.yaml

+13-2
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
name: Run Formatting-Checks
3333
run: cargo fmt --check
3434

35-
check:
35+
check:
3636
name: Static Analysis
3737
runs-on: ubuntu-latest
3838
needs: format
@@ -57,6 +57,12 @@ jobs:
5757
name: Enable Workflow Cache
5858
uses: Swatinem/rust-cache@v2
5959

60+
- id: tools
61+
name: Install Tools
62+
uses: taiki-e/install-action@v2
63+
with:
64+
tool: cargo-machete
65+
6066
- id: check
6167
name: Run Build Checks
6268
run: cargo check --tests --benches --examples --workspace --all-targets --all-features
@@ -71,7 +77,13 @@ jobs:
7177
RUSTDOCFLAGS: "-D warnings"
7278
run: cargo doc --no-deps --bins --examples --workspace --all-features
7379

80+
- id: clean
81+
name: Clean Build Directory
82+
run: cargo clean
7483

84+
- id: deps
85+
name: Check Unused Dependencies
86+
run: cargo machete
7587

7688
unit:
7789
name: Units
@@ -134,7 +146,6 @@ jobs:
134146
name: Enable Job Cache
135147
uses: Swatinem/rust-cache@v2
136148

137-
138149
- id: test-sqlite
139150
name: Run Integration Tests (SQLite)
140151
run: ./contrib/dev-tools/container/e2e/sqlite/run-e2e-tests.sh

Cargo.toml

+1-2
Original file line numberDiff line numberDiff line change
@@ -99,11 +99,10 @@ uuid = { version = "1", features = ["v4"] }
9999

100100
[dev-dependencies]
101101
tempfile = "3"
102-
uuid = { version = "1", features = ["v4"] }
103102
which = "6"
104103

105104
[package.metadata.cargo-machete]
106-
ignored = ["sha-1"]
105+
ignored = ["sha-1", "futures"]
107106

108107
[lints.clippy]
109108
complexity = { level = "deny", priority = -1 }

0 commit comments

Comments
 (0)