name: dep-lint
on:
push:
paths:
- "**/Cargo.toml"
- "**/Cargo.lock"
- "Cargo.toml"
- "Cargo.lock"
env:
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: 0
CARGO_NET_RETRY: 10
CI: 1
RUST_BACKTRACE: short
RUSTFLAGS: "-W rust-2021-compatibility"
RUSTUP_MAX_RETRIES: 10
jobs:
cargo-lint:
runs-on: ubuntu-latest
timeout-minutes: 10
concurrency:
group: toml-${{ github.repository }}-${{ github.ref }}
cancel-in-progress: true
steps:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
- uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly
- name: Install tooling
run: |
cargo +nightly install --locked cargo-udeps
cargo +nightly install --locked cargo-autoinherit
- name: Show Cargo and rustc version
run: |
cargo +nightly --version
rustc --version
- name: Check for unused dependencies
run: cargo +nightly udeps --all-targets --all-features