From 15919ad33dbf640e50f6c4d0cd13485be86f7421 Mon Sep 17 00:00:00 2001 From: laruh Date: Fri, 27 Dec 2024 18:43:01 +0700 Subject: [PATCH] Validate Cargo.lock --- .github/workflows/fmt-and-lint.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/fmt-and-lint.yml b/.github/workflows/fmt-and-lint.yml index b5212320dd..7d53652d3b 100644 --- a/.github/workflows/fmt-and-lint.yml +++ b/.github/workflows/fmt-and-lint.yml @@ -29,6 +29,9 @@ jobs: - name: Build cache uses: ./.github/actions/build-cache + - name: Backup Cargo.lock + run: cp Cargo.lock Cargo.lock.bak + - name: fmt check # Format checks aren't OS dependant. if: matrix.os == 'ubuntu-latest' @@ -37,6 +40,14 @@ jobs: - name: clippy lint run: cargo clippy --all-targets --all-features -- --D warnings + - name: Validate Cargo.lock + run: | + if ! diff Cargo.lock Cargo.lock.bak; then + echo "Error: Cargo.lock has changed during the workflow. Ensure Cargo.lock is up-to-date and committed." + exit 1 + fi + shell: bash + wasm-lint: name: Wasm Lint Checks timeout-minutes: 45