diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 467efc0c1a..f48f7fed3e 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -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