Skip to content

Commit b8e2474

Browse files
committed
chore(ci): make cache keys deterministic and add cache debug logging
1 parent 919ca63 commit b8e2474

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

‎.github/workflows/playwright-test.yml‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,10 @@ jobs:
9090
path: |
9191
node_modules
9292
src/vendor
93-
key: ${{ runner.os }}-${{ inputs.test-mode }}-deps-${{ steps.deps-hash.outputs.deps_hash }}-${{ github.run_id }}-${{ github.job }}
93+
key: ${{ runner.os }}-${{ inputs.test-mode }}-deps-${{ steps.deps-hash.outputs.deps_hash }}
9494
restore-keys: |
9595
${{ runner.os }}-${{ inputs.test-mode }}-deps-${{ steps.deps-hash.outputs.deps_hash }}-
96+
${{ runner.os }}-${{ inputs.test-mode }}-deps-
9697
9798
- name: Install workflow dependencies
9899
if: steps.deps-cache.outputs.cache-matched-key == ''
@@ -105,7 +106,7 @@ jobs:
105106
path: |
106107
src/vendor
107108
node_modules
108-
key: ${{ steps.deps-cache.outputs.cache-primary-key }}
109+
key: ${{ runner.os }}-${{ inputs.test-mode }}-deps-${{ steps.deps-hash.outputs.deps_hash }}
109110

110111
- name: Wait for WordPress to be reachable
111112
run: |
@@ -205,9 +206,10 @@ jobs:
205206
with:
206207
path: |
207208
~/.cache/ms-playwright
208-
key: ${{ runner.os }}-playwright-browsers-${{ hashFiles('package-lock.json') }}-${{ github.run_id }}-${{ github.job }}
209+
key: ${{ runner.os }}-playwright-browsers-${{ hashFiles('package-lock.json') }}
209210
restore-keys: |
210211
${{ runner.os }}-playwright-browsers-${{ hashFiles('package-lock.json') }}-
212+
${{ runner.os }}-playwright-browsers-
211213
212214
- name: Install playwright/test
213215
if: steps.playwright-browsers-cache.outputs.cache-matched-key == ''
@@ -220,7 +222,7 @@ jobs:
220222
with:
221223
path: |
222224
~/.cache/ms-playwright
223-
key: ${{ steps.playwright-browsers-cache.outputs.cache-primary-key }}
225+
key: ${{ runner.os }}-playwright-browsers-${{ hashFiles('package-lock.json') }}
224226

225227
- name: Run Playwright tests
226228
env:

0 commit comments

Comments
 (0)