Skip to content

Commit 2cce6f0

Browse files
committed
ci: update test cache key
1 parent 1966d63 commit 2cce6f0

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

.github/workflows/test.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,17 @@ jobs:
3232
run: cargo build --verbose
3333

3434
- name: Restore cache
35+
id: cache
3536
uses: actions/cache/restore@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1
3637
with:
3738
path: |
3839
~/.cargo/bin/
3940
~/.cargo/registry/index/
4041
~/.cargo/registry/cache/
4142
~/.cargo/git/db/
42-
key: cargo-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}-${{ github.run_id }}
43+
key: cargo-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}
4344
restore-keys: |
44-
cargo-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}
45+
cargo-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}-
4546
cargo-${{ runner.os }}-
4647
4748
- run: cargo install cargo-tarpaulin --locked || true
@@ -58,7 +59,7 @@ jobs:
5859
~/.cargo/registry/index/
5960
~/.cargo/registry/cache/
6061
~/.cargo/git/db/
61-
key: cargo-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}-${{ github.run_id }}
62+
key: ${{ steps.cache.outputs.cache-primary-key }}-${{ github.run_id }}-${{ github.run_attempt }}
6263

6364
- name: SonarQube Scan
6465
if: matrix.os == 'ubuntu-latest'

0 commit comments

Comments
 (0)