Skip to content

CI: detect unused dependencies #103

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 30, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,24 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Cache cargo dependencies
id: cache-cargo
uses: actions/cache@v4
env:
cache-name: cache-cargo-dependencies
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/Cargo.lock', '**/Cargo.toml') }}

- uses: Swatinem/rust-cache@v2
- name: Versions
run: |
cargo version
cargo clippy --version

- name: Run clippy
run: cargo clippy -- -D warnings

check-for-unused-deps:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4

- name: Install cargo-binstall
uses: cargo-bins/cargo-binstall@main

- name: Install cargo-shear
run: cargo binstall --no-confirm cargo-shear

- run: cargo shear
14 changes: 1 addition & 13 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,7 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Cache cargo dependencies
id: cache-cargo
uses: actions/cache@v4
env:
cache-name: cache-cargo-dependencies
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/Cargo.lock', '**/Cargo.toml') }}
- uses: Swatinem/rust-cache@v2

- name: Version
run: cargo version
Expand Down
1 change: 0 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion examples/voting/client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,4 @@ tokio = { version = "1.45.1", features = ["full"] }
anyhow = "1.0.98"
clap = { version = "4.5.38", features = ["derive"] }
hex = "0.4.3"
humantime = "2.2.0"
futures = "0.3.31"
5 changes: 5 additions & 0 deletions types/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ arbitrary = [
"dep:arbitrary",
]

[package.metadata.cargo-shear]
ignored = [
"pod-types", # self-depend for tests to enable the arbitrary feature
]

[dependencies]
alloy-consensus = { version = "0.12.1", features = [
"serde",
Expand Down