From 91905284bf1e1c31b7526f2939d93d83cc081a5d Mon Sep 17 00:00:00 2001 From: Luke Parker Date: Tue, 5 Dec 2023 04:55:47 -0500 Subject: [PATCH] Have the CI check the lockfile isn't stale Prevents a commit review from passing, yet then the next commit 'adding' 100 new dependencies. --- .github/workflows/lint.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 5f2c2e1b..420f3725 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -28,6 +28,14 @@ jobs: - name: Run Clippy run: cargo +${{ steps.nightly.outputs.version }} clippy --all-features --all-targets -- -D warnings -A clippy::items_after_test_module + # Also verify the lockfile isn't dirty + # This happens when someone edits a Cargo.toml yet doesn't do anything + # which causes the lockfile to be updated + # The above clippy run will cause it to be updated, so checking there's + # no differences present now performs the desired check + - name: Verify lockfile + run: git diff | wc -l | grep -x "0" + deny: runs-on: ubuntu-latest steps: