From 14c26d49be152899f6289bfcaaf211741fea9663 Mon Sep 17 00:00:00 2001 From: Cameron Garnham Date: Thu, 3 Oct 2024 12:48:47 +0200 Subject: [PATCH] ci: use machete to check for unused deps --- .github/workflows/testing.yaml | 15 +++++++++++++-- Cargo.toml | 3 +-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/.github/workflows/testing.yaml b/.github/workflows/testing.yaml index 4db0b599..f9c9cd06 100644 --- a/.github/workflows/testing.yaml +++ b/.github/workflows/testing.yaml @@ -32,7 +32,7 @@ jobs: name: Run Formatting-Checks run: cargo fmt --check - check: + check: name: Static Analysis runs-on: ubuntu-latest needs: format @@ -57,6 +57,12 @@ jobs: name: Enable Workflow Cache uses: Swatinem/rust-cache@v2 + - id: tools + name: Install Tools + uses: taiki-e/install-action@v2 + with: + tool: cargo-machete + - id: check name: Run Build Checks run: cargo check --tests --benches --examples --workspace --all-targets --all-features @@ -71,7 +77,13 @@ jobs: RUSTDOCFLAGS: "-D warnings" run: cargo doc --no-deps --bins --examples --workspace --all-features + - id: clean + name: Clean Build Directory + run: cargo clean + - id: deps + name: Check Unused Dependencies + run: cargo machete unit: name: Units @@ -134,7 +146,6 @@ jobs: name: Enable Job Cache uses: Swatinem/rust-cache@v2 - - id: test-sqlite name: Run Integration Tests (SQLite) run: ./contrib/dev-tools/container/e2e/sqlite/run-e2e-tests.sh diff --git a/Cargo.toml b/Cargo.toml index 09fa6ff7..26cf13cd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -99,11 +99,10 @@ uuid = { version = "1", features = ["v4"] } [dev-dependencies] tempfile = "3" -uuid = { version = "1", features = ["v4"] } which = "6" [package.metadata.cargo-machete] -ignored = ["sha-1"] +ignored = ["sha-1", "futures"] [lints.clippy] complexity = { level = "deny", priority = -1 }