From 01a86423363492c0a6106345175ae37b08a9aef7 Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Mon, 1 Apr 2024 14:58:20 +1100 Subject: [PATCH] CI: Lint the crate using --all-targets --all-features We are not currently running the linter in CI, do so. --- .github/workflows/rust.yml | 6 ++++++ contrib/test.sh | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 333c80d7d..7a50ba319 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -15,6 +15,8 @@ jobs: profile: minimal toolchain: nightly override: true + - name: Install clippy + run: rustup component add clippy - name: Running benchmarks env: DO_BENCH: true @@ -27,6 +29,10 @@ jobs: env: DO_FMT: true run: ./contrib/test.sh + - name: Running linter + env: + DO_LINT: true + run: ./contrib/test.sh Int-tests: name: Integration tests diff --git a/contrib/test.sh b/contrib/test.sh index be50ca451..ea32052b5 100755 --- a/contrib/test.sh +++ b/contrib/test.sh @@ -33,6 +33,10 @@ fi # Defaults / sanity checks cargo test +if [ "$DO_LINT" = true ]; then + cargo +nightly clippy --all-targets --all-features -- -D warnings +fi + if [ "$DO_FEATURE_MATRIX" = true ] then # All features