fix: stable cache key (no SHA) — durations are about files, not commits
SHA-keyed caches miss on every new commit and on PR merge commits. Single stable key: main always overwrites, PRs always find it.
This commit is contained in:
@@ -36,11 +36,11 @@ jobs:
|
||||
uses: actions/cache/restore@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
|
||||
with:
|
||||
path: test_durations.json
|
||||
key: test-durations-${{ github.sha }}
|
||||
# Any previous cache from any branch works — caches from main
|
||||
# are visible to all PRs; branch caches are visible to PRs
|
||||
# targeting that branch.
|
||||
restore-keys: test-durations-
|
||||
# Single stable key — main always overwrites, PRs always find it.
|
||||
# No SHA in the key: durations are about *files*, not commits,
|
||||
# and SHA-keyed caches miss on every new commit (and on PR merge
|
||||
# commits which have a different SHA than the head).
|
||||
key: test-durations
|
||||
|
||||
- name: Install ripgrep (prebuilt binary)
|
||||
run: |
|
||||
@@ -139,7 +139,7 @@ jobs:
|
||||
uses: actions/cache/save@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
|
||||
with:
|
||||
path: test_durations.json
|
||||
key: test-durations-${{ github.sha }}
|
||||
key: test-durations
|
||||
|
||||
e2e:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
Reference in New Issue
Block a user