diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 84f624b..acdca97 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -26,10 +26,13 @@ jobs: - name: Install Rust uses: dtolnay/rust-toolchain@89b12181fb390509a0842a86cc55eeb8eb928c1d # stable + - name: Verify Cargo.lock is up to date + run: cargo metadata --locked --all-features --format-version 1 > /dev/null + - uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2 - name: Build (release) - run: cargo build --release + run: cargo build --locked --release - name: Run tests run: cargo test --release @@ -46,6 +49,9 @@ jobs: - name: Install Rust uses: dtolnay/rust-toolchain@89b12181fb390509a0842a86cc55eeb8eb928c1d # stable + - name: Verify Cargo.lock is up to date + run: cargo metadata --locked --all-features --format-version 1 > /dev/null + - uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2 - name: Resolve version @@ -57,7 +63,7 @@ jobs: echo "tag=$REF" >> "$GITHUB_OUTPUT" - name: Build release binary - run: cargo build --release + run: cargo build --locked --release - name: Stage install tree run: | diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 6bb2526..22656c8 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -27,10 +27,10 @@ jobs: run: cargo fmt --check - name: Clippy - run: cargo clippy --all-targets --features test-support -- -D warnings + run: cargo clippy --locked --all-targets --features test-support -- -D warnings - name: Build - run: cargo build --verbose + run: cargo build --locked --verbose - name: Run tests run: cargo test --verbose --features test-support -- --test-threads=1