From 4f8f7adb679eec85fdd190c035e34f2552c385d8 Mon Sep 17 00:00:00 2001 From: Teakowa Date: Mon, 17 Aug 2026 20:00:07 +0800 Subject: [PATCH] ci: separate Rust toolchain and cache ownership Use explicit toolchain and rust-cache steps, bound cache writers to main, and keep Cargo dependency commands locked. Refs #3 --- .github/workflows/ci.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3826c94..80e022e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,13 +32,17 @@ jobs: - uses: Swatinem/rust-cache@v2 with: shared-key: quality + cache-targets: true + cache-all-crates: false + cache-workspace-crates: false + cache-bin: false save-if: ${{ github.ref == 'refs/heads/main' }} cache-on-failure: false - name: Format check run: cargo fmt --all --check - name: Clippy (deny warnings) - run: cargo clippy --workspace --all-targets -- -D warnings + run: cargo clippy --locked --workspace --all-targets -- -D warnings - name: Tests - run: cargo test --workspace --all-targets + run: cargo test --locked --workspace --all-targets - name: Catalog check - run: cargo run -p workshop-rs --bin workshop-catalog-gen -- check + run: cargo run --locked -p workshop-rs --bin workshop-catalog-gen -- check