We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 8ea16a6 + 684eb6b commit c1cc586Copy full SHA for c1cc586
1 file changed
.github/workflows/test.yml
@@ -36,7 +36,11 @@ jobs:
36
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb
37
with:
38
path: .jest-cache
39
- key: ${{ runner.os }}-jest
+ # Per-shard key: each shard only instruments the ~1/8 of suites it runs, so a single
40
+ # shared key freezes one shard's partial cache for all shards. The hash refreshes the
41
+ # cache when dependencies or Babel config change; restore-keys warms it in between.
42
+ key: ${{ runner.os }}-jest-${{ matrix.chunk }}-${{ hashFiles('package-lock.json', 'babel.config.js') }}
43
+ restore-keys: ${{ runner.os }}-jest-${{ matrix.chunk }}-
44
45
- name: Jest tests
46
run: npm test -- --silent --shard=${{ fromJSON(matrix.chunk) }}/${{ strategy.job-total }} --maxWorkers=6 --coverage --coverageDirectory=coverage/shard-${{ matrix.chunk }}
0 commit comments