@samitouri / QOS-React / commits / ef1103d3e9

[ci] Fix node_modules cache glob (#32604)

Seems like the stringified cache path can cause some directories not to be cached, trying an alternative format

lauren committed Mar 13, 2025 at 20:59 UTC ef1103d3e92168803000e12d9a27cb7440e5e1c8
10 files changed +93 -62
.github/workflows/compiler_playground.yml
+3 -2
@@ -36,8 +36,9 @@ jobs:
36 uses: actions/cache@v4
37 id: node_modules
38 with:
39 - path: "**/node_modules"
40 - key: compiler-node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('compiler/**/yarn.lock') }}
39 + path: |
40 + **/node_modules
41 + key: compiler-node_modules-v2-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('compiler/**/yarn.lock') }}
42 - run: yarn install --frozen-lockfile
43 - run: npx playwright install --with-deps chromium
44 - run: CI=true yarn test
.github/workflows/compiler_prereleases.yml
+3 -2
@@ -46,8 +46,9 @@ jobs:
46 uses: actions/cache@v4
47 id: node_modules
48 with:
49 - path: "**/node_modules"
50 - key: compiler-node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('compiler/**/yarn.lock') }}
49 + path: |
50 + **/node_modules
51 + key: compiler-node_modules-v2-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('compiler/**/yarn.lock') }}
52 - run: yarn install --frozen-lockfile
53 - name: Publish packages to npm
54 run: |
.github/workflows/compiler_typescript.yml
+9 -6
@@ -46,8 +46,9 @@ jobs:
46 - name: Restore cached node_modules
47 uses: actions/cache@v4
48 with:
49 - path: "**/node_modules"
50 - key: compiler-node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('compiler/**/yarn.lock') }}
49 + path: |
50 + **/node_modules
51 + key: compiler-node_modules-v2-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('compiler/**/yarn.lock') }}
52 - run: yarn install --frozen-lockfile
53 - run: yarn workspace babel-plugin-react-compiler lint
54
@@ -66,8 +67,9 @@ jobs:
67 uses: actions/cache@v4
68 id: node_modules
69 with:
69 - path: "**/node_modules"
70 - key: compiler-node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('compiler/**/yarn.lock') }}
70 + path: |
71 + **/node_modules
72 + key: compiler-node_modules-v2-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('compiler/**/yarn.lock') }}
73 - run: yarn install --frozen-lockfile
74 - run: yarn workspace babel-plugin-react-compiler jest
75
@@ -90,8 +92,9 @@ jobs:
92 uses: actions/cache@v4
93 id: node_modules
94 with:
93 - path: "**/node_modules"
94 - key: compiler-node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('compiler/**/yarn.lock') }}
95 + path: |
96 + **/node_modules
97 + key: compiler-node_modules-v2-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('compiler/**/yarn.lock') }}
98 - run: yarn install --frozen-lockfile
99 - run: xvfb-run -a yarn workspace ${{ matrix.workspace_name }} test
100 if: runner.os == 'Linux' && matrix.workspace_name == 'react-forgive'
.github/workflows/devtools_regression_tests.yml
+12 -8
@@ -29,8 +29,9 @@ jobs:
29 uses: actions/cache@v4
30 id: node_modules
31 with:
32 - path: "**/node_modules"
33 - key: runtime-release-node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'scripts/release/yarn.lock') }}
32 + path: |
33 + **/node_modules
34 + key: runtime-release-node_modules-v2-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'scripts/release/yarn.lock') }}
35 - name: Ensure clean build directory
36 run: rm -rf build
37 - run: yarn install --frozen-lockfile
@@ -63,8 +64,9 @@ jobs:
64 uses: actions/cache@v4
65 id: node_modules
66 with:
66 - path: "**/node_modules"
67 - key: runtime-node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
67 + path: |
68 + **/node_modules
69 + key: runtime-node_modules-v2-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
70 - name: Ensure clean build directory
71 run: rm -rf build
72 - run: yarn install --frozen-lockfile
@@ -120,8 +122,9 @@ jobs:
122 uses: actions/cache@v4
123 id: node_modules
124 with:
123 - path: "**/node_modules"
124 - key: runtime-node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
125 + path: |
126 + **/node_modules
127 + key: runtime-node_modules-v2-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
128 - run: yarn install --frozen-lockfile
129 - name: Restore all archived build artifacts
130 uses: actions/download-artifact@v4
@@ -154,8 +157,9 @@ jobs:
157 uses: actions/cache@v4
158 id: node_modules
159 with:
157 - path: "**/node_modules"
158 - key: runtime-node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
160 + path: |
161 + **/node_modules
162 + key: runtime-node_modules-v2-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
163 - run: yarn install --frozen-lockfile
164 - name: Restore all archived build artifacts
165 uses: actions/download-artifact@v4
.github/workflows/runtime_build_and_test.yml
+42 -28
@@ -55,8 +55,9 @@ jobs:
55 uses: actions/cache@v4
56 id: node_modules
57 with:
58 - path: "**/node_modules"
59 - key: runtime-node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
58 + path: |
59 + **/node_modules
60 + key: runtime-node_modules-v2-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
61 - name: Ensure clean build directory
62 run: rm -rf build
63 - run: yarn install --frozen-lockfile
@@ -79,8 +80,9 @@ jobs:
80 uses: actions/cache@v4
81 id: node_modules
82 with:
82 - path: "**/node_modules"
83 - key: runtime-node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
83 + path: |
84 + **/node_modules
85 + key: runtime-node_modules-v2-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
86 - name: Ensure clean build directory
87 run: rm -rf build
88 - run: yarn install --frozen-lockfile
@@ -107,8 +109,9 @@ jobs:
109 uses: actions/cache@v4
110 id: node_modules
111 with:
110 - path: "**/node_modules"
111 - key: runtime-node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
112 + path: |
113 + **/node_modules
114 + key: runtime-node_modules-v2-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
115 - name: Ensure clean build directory
116 run: rm -rf build
117 - run: yarn install --frozen-lockfile
@@ -162,8 +165,9 @@ jobs:
165 uses: actions/cache@v4
166 id: node_modules
167 with:
165 - path: "**/node_modules"
166 - key: runtime-node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
168 + path: |
169 + **/node_modules
170 + key: runtime-node_modules-v2-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
171 - name: Ensure clean build directory
172 run: rm -rf build
173 - run: yarn install --frozen-lockfile
@@ -198,8 +202,9 @@ jobs:
202 uses: actions/cache@v4
203 id: node_modules
204 with:
201 - path: "**/node_modules"
202 - key: runtime-node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
205 + path: |
206 + **/node_modules
207 + key: runtime-node_modules-v2-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
208 - name: Ensure clean build directory
209 run: rm -rf build
210 - run: yarn install --frozen-lockfile
@@ -274,8 +279,9 @@ jobs:
279 uses: actions/cache@v4
280 id: node_modules
281 with:
277 - path: "**/node_modules"
278 - key: runtime-node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
282 + path: |
283 + **/node_modules
284 + key: runtime-node_modules-v2-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
285 - name: Ensure clean build directory
286 run: rm -rf build
287 - run: yarn install --frozen-lockfile
@@ -308,8 +314,9 @@ jobs:
314 uses: actions/cache@v4
315 id: node_modules
316 with:
311 - path: "**/node_modules"
312 - key: runtime-node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
317 + path: |
318 + **/node_modules
319 + key: runtime-node_modules-v2-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
320 - name: Ensure clean build directory
321 run: rm -rf build
322 - run: yarn install --frozen-lockfile
@@ -357,8 +364,9 @@ jobs:
364 uses: actions/cache@v4
365 id: node_modules
366 with:
360 - path: "**/node_modules"
361 - key: runtime-node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
367 + path: |
368 + **/node_modules
369 + key: runtime-node_modules-v2-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
370 - name: Ensure clean build directory
371 run: rm -rf build
372 - run: yarn install --frozen-lockfile
@@ -394,8 +402,9 @@ jobs:
402 uses: actions/cache@v4
403 id: node_modules
404 with:
397 - path: "**/node_modules"
398 - key: runtime-node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
405 + path: |
406 + **/node_modules
407 + key: runtime-node_modules-v2-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
408 - name: Ensure clean build directory
409 run: rm -rf build
410 - run: yarn install --frozen-lockfile
@@ -428,8 +437,9 @@ jobs:
437 uses: actions/cache@v4
438 id: node_modules
439 with:
431 - path: "**/node_modules"
432 - key: fixtures_dom-node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('fixtures/dom/yarn.lock') }}
440 + path: |
441 + **/node_modules
442 + key: fixtures_dom-node_modules-v2-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('fixtures/dom/yarn.lock') }}
443 - name: Ensure clean build directory
444 run: rm -rf build
445 - run: yarn install --frozen-lockfile
@@ -471,8 +481,9 @@ jobs:
481 uses: actions/cache@v4
482 id: node_modules
483 with:
474 - path: "**/node_modules"
475 - key: fixtures_flight-node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
484 + path: |
485 + **/node_modules
486 + key: fixtures_flight-node_modules-v2-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
487 - name: Ensure clean build directory
488 run: rm -rf build
489 - run: yarn install --frozen-lockfile
@@ -535,8 +546,9 @@ jobs:
546 uses: actions/cache@v4
547 id: node_modules
548 with:
538 - path: "**/node_modules"
539 - key: runtime-node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
549 + path: |
550 + **/node_modules
551 + key: runtime-node_modules-v2-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
552 - name: Ensure clean build directory
553 run: rm -rf build
554 - run: yarn install --frozen-lockfile
@@ -588,8 +600,9 @@ jobs:
600 uses: actions/cache@v4
601 id: node_modules
602 with:
591 - path: "**/node_modules"
592 - key: runtime-node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
603 + path: |
604 + **/node_modules
605 + key: runtime-node_modules-v2-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
606 - name: Ensure clean build directory
607 run: rm -rf build
608 - run: yarn install --frozen-lockfile
@@ -627,8 +640,9 @@ jobs:
640 uses: actions/cache@v4
641 id: node_modules
642 with:
630 - path: "**/node_modules"
631 - key: runtime-node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
643 + path: |
644 + **/node_modules
645 + key: runtime-node_modules-v2-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
646 - name: Ensure clean build directory
647 run: rm -rf build
648 - run: yarn install --frozen-lockfile
.github/workflows/runtime_commit_artifacts.yml
+3 -2
@@ -73,8 +73,9 @@ jobs:
73 uses: actions/cache@v4
74 id: node_modules
75 with:
76 - path: "**/node_modules"
77 - key: runtime-release-node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'scripts/release/yarn.lock') }}
76 + path: |
77 + **/node_modules
78 + key: runtime-release-node_modules-v2-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'scripts/release/yarn.lock') }}
79 - name: Ensure clean build directory
80 run: rm -rf build
81 - run: yarn install --frozen-lockfile
.github/workflows/runtime_eslint_plugin_e2e.yml
+3 -2
@@ -40,8 +40,9 @@ jobs:
40 uses: actions/cache@v4
41 id: node_modules
42 with:
43 - path: "**/node_modules"
44 - key: runtime-eslint_e2e-node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
43 + path: |
44 + **/node_modules
45 + key: runtime-eslint_e2e-node_modules-v2-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
46 - name: Ensure clean build directory
47 run: rm -rf build
48 - run: yarn install --frozen-lockfile
.github/workflows/runtime_prereleases.yml
+3 -2
@@ -39,8 +39,9 @@ jobs:
39 uses: actions/cache@v4
40 id: node_modules
41 with:
42 - path: "**/node_modules"
43 - key: runtime-release-node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
42 + path: |
43 + **/node_modules
44 + key: runtime-release-node_modules-v2-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
45 - name: Ensure clean build directory
46 run: rm -rf build
47 - run: yarn install --frozen-lockfile
.github/workflows/runtime_releases_from_npm_manual.yml
+3 -2
@@ -71,8 +71,9 @@ jobs:
71 uses: actions/cache@v4
72 id: node_modules
73 with:
74 - path: "**/node_modules"
75 - key: runtime-release-node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
74 + path: |
75 + **/node_modules
76 + key: runtime-release-node_modules-v2-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
77 - name: Ensure clean build directory
78 run: rm -rf build
79 - run: yarn install --frozen-lockfile
.github/workflows/shared_lint.yml
+12 -8
@@ -28,8 +28,9 @@ jobs:
28 - name: Restore cached node_modules
29 uses: actions/cache@v4
30 with:
31 - path: "**/node_modules"
32 - key: shared-lint-node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
31 + path: |
32 + **/node_modules
33 + key: shared-lint-node_modules-v2-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
34 - name: Ensure clean build directory
35 run: rm -rf build
36 - run: yarn install --frozen-lockfile
@@ -48,8 +49,9 @@ jobs:
49 - name: Restore cached node_modules
50 uses: actions/cache@v4
51 with:
51 - path: "**/node_modules"
52 - key: shared-lint-node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
52 + path: |
53 + **/node_modules
54 + key: shared-lint-node_modules-v2-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
55 - name: Ensure clean build directory
56 run: rm -rf build
57 - run: yarn install --frozen-lockfile
@@ -68,8 +70,9 @@ jobs:
70 - name: Restore cached node_modules
71 uses: actions/cache@v4
72 with:
71 - path: "**/node_modules"
72 - key: shared-lint-node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
73 + path: |
74 + **/node_modules
75 + key: shared-lint-node_modules-v2-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
76 - name: Ensure clean build directory
77 run: rm -rf build
78 - run: yarn install --frozen-lockfile
@@ -88,8 +91,9 @@ jobs:
91 - name: Restore cached node_modules
92 uses: actions/cache@v4
93 with:
91 - path: "**/node_modules"
92 - key: shared-lint-node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
94 + path: |
95 + **/node_modules
96 + key: shared-lint-node_modules-v2-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
97 - name: Ensure clean build directory
98 run: rm -rf build
99 - run: yarn install --frozen-lockfile