Skip to content
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

ci: Test for unused dependencies #4117

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
9 changes: 9 additions & 0 deletions tests/integration_tests/build/test_dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,12 @@ def test_licenses():
)

cargo("deny", f"--manifest-path {toml_file} check licenses bans")


def test_unused_dependencies():
"""
Test that there are no unused dependencies.
"""
cargo("install cargo-udeps")

cargo("+nightly udeps --all")
3 changes: 2 additions & 1 deletion tools/devctr/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,9 @@ RUN cd /tmp/poetry && \
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain "$RUST_TOOLCHAIN" \
&& rustup target add x86_64-unknown-linux-musl \
&& rustup target add aarch64-unknown-linux-musl \
&& rustup install nightly \
&& rustup component add llvm-tools-preview \
&& cargo install cargo-audit cargo-deny grcov cargo-sort \
&& cargo install cargo-audit cargo-deny grcov cargo-sort cargo-udeps \
&& (if [ "$ARCH" = "x86_64" ]; then cargo install kani-verifier && cargo kani setup; else true; fi) \
\
&& apt-get update \
Expand Down
Loading