@samitouri / QOS-React-2 / commits / 926fa85541

[ci] Remove redundant node_modules caches (#36457)

Sebastian "Sebbie" Silbermann committed May 26, 2026 at 15:30 UTC 926fa8554175bbe335fe50494231bcd13c49e078
10 files changed +44 -148
.github/workflows/compiler_playground.yml
+1 -3
@@ -32,9 +32,7 @@ jobs:
32 - uses: actions/setup-node@v4
33 with:
34 node-version-file: '.nvmrc'
35 - cache: yarn
36 - cache-dependency-path: compiler/**/yarn.lock
37 - - name: Restore cached node_modules
35 + - name: Cache node_modules
36 uses: actions/cache@v4
37 id: node_modules
38 with:
.github/workflows/compiler_prereleases.yml
+1 -3
@@ -47,9 +47,7 @@ jobs:
47 - uses: actions/setup-node@v4
48 with:
49 node-version-file: '.nvmrc'
50 - cache: yarn
51 - cache-dependency-path: compiler/yarn.lock
52 - - name: Restore cached node_modules
50 + - name: Cache node_modules
51 uses: actions/cache@v4
52 id: node_modules
53 with:
.github/workflows/compiler_typescript.yml
+3 -7
@@ -45,7 +45,7 @@ jobs:
45 node-version-file: '.nvmrc'
46 cache: yarn
47 cache-dependency-path: compiler/yarn.lock
48 - - name: Restore cached node_modules
48 + - name: Cache node_modules
49 uses: actions/cache@v4
50 id: node_modules
51 with:
@@ -65,9 +65,7 @@ jobs:
65 - uses: actions/setup-node@v4
66 with:
67 node-version-file: '.nvmrc'
68 - cache: yarn
69 - cache-dependency-path: compiler/yarn.lock
70 - - name: Restore cached node_modules
68 + - name: Cache node_modules
69 uses: actions/cache@v4
70 id: node_modules
71 with:
@@ -91,9 +89,7 @@ jobs:
89 - uses: actions/setup-node@v4
90 with:
91 node-version-file: '.nvmrc'
94 - cache: yarn
95 - cache-dependency-path: compiler/yarn.lock
96 - - name: Restore cached node_modules
92 + - name: Cache node_modules
93 uses: actions/cache@v4
94 id: node_modules
95 with:
.github/workflows/devtools_regression_tests.yml
+7 -15
@@ -28,9 +28,7 @@ jobs:
28 - uses: actions/setup-node@v4
29 with:
30 node-version-file: '.nvmrc'
31 - cache: yarn
32 - cache-dependency-path: yarn.lock
33 - - name: Restore cached node_modules
31 + - name: Cache node_modules
32 uses: actions/cache@v4
33 id: node_modules
34 with:
@@ -65,15 +63,13 @@ jobs:
63 - uses: actions/setup-node@v4
64 with:
65 node-version-file: '.nvmrc'
68 - cache: yarn
69 - cache-dependency-path: yarn.lock
70 - - name: Restore cached node_modules
66 + - name: Cache node_modules
67 uses: actions/cache@v4
68 id: node_modules
69 with:
70 path: |
71 **/node_modules
76 - key: runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
72 + key: runtime-node_modules-v9-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
73 - name: Ensure clean build directory
74 run: rm -rf build
75 - run: yarn install --frozen-lockfile
@@ -127,15 +123,13 @@ jobs:
123 - uses: actions/setup-node@v4
124 with:
125 node-version-file: '.nvmrc'
130 - cache: yarn
131 - cache-dependency-path: yarn.lock
132 - - name: Restore cached node_modules
126 + - name: Cache node_modules
127 uses: actions/cache@v4
128 id: node_modules
129 with:
130 path: |
131 **/node_modules
138 - key: runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
132 + key: runtime-node_modules-v9-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
133 - run: yarn install --frozen-lockfile
134 if: steps.node_modules.outputs.cache-hit != 'true'
135 - name: Restore all archived build artifacts
@@ -163,15 +157,13 @@ jobs:
157 - uses: actions/setup-node@v4
158 with:
159 node-version-file: '.nvmrc'
166 - cache: yarn
167 - cache-dependency-path: yarn.lock
168 - - name: Restore cached node_modules
160 + - name: Cache node_modules
161 uses: actions/cache@v4
162 id: node_modules
163 with:
164 path: |
165 **/node_modules
174 - key: runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
166 + key: runtime-node_modules-v9-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
167 - run: yarn install --frozen-lockfile
168 if: steps.node_modules.outputs.cache-hit != 'true'
169 - name: Restore all archived build artifacts
.github/workflows/runtime_build_and_test.yml
+25 -99
@@ -39,37 +39,23 @@ jobs:
39 - uses: actions/checkout@v4
40 with:
41 ref: ${{ github.event.inputs.commit_sha != '' && github.event.inputs.commit_sha || github.event.pull_request.head.sha || github.sha }}
42 - - name: Check cache hit
43 - uses: actions/cache/restore@v4
42 +
43 + - name: Prepare cache
44 id: node_modules
45 + uses: actions/cache@v4
46 with:
47 path: |
48 **/node_modules
48 - key: runtime-node_modules-v8-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
49 - lookup-only: true
49 + key: runtime-node_modules-v9-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
50 + # Don't use restore-keys here. Otherwise the cache grows indefinitely.
51 +
52 - uses: actions/setup-node@v4
53 if: steps.node_modules.outputs.cache-hit != 'true'
54 with:
55 node-version-file: '.nvmrc'
54 - cache: yarn
55 - cache-dependency-path: yarn.lock
56 - - name: Warm with old cache
57 - if: steps.node_modules.outputs.cache-hit != 'true'
58 - uses: actions/cache/restore@v4
59 - with:
60 - path: |
61 - **/node_modules
62 - key: runtime-node_modules-v8-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
63 - # Don't use restore-keys here. Otherwise the cache grows indefinitely.
56 +
57 - run: yarn install --frozen-lockfile
58 if: steps.node_modules.outputs.cache-hit != 'true'
66 - - name: Save cache
67 - if: steps.node_modules.outputs.cache-hit != 'true'
68 - uses: actions/cache/save@v4
69 - with:
70 - path: |
71 - **/node_modules
72 - key: runtime-node_modules-v8-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
59
60 runtime_compiler_node_modules_cache:
61 name: Cache Runtime, Compiler node_modules
@@ -78,41 +64,21 @@ jobs:
64 - uses: actions/checkout@v4
65 with:
66 ref: ${{ github.event.inputs.commit_sha != '' && github.event.inputs.commit_sha || github.event.pull_request.head.sha || github.sha }}
81 - - name: Check cache hit
82 - uses: actions/cache/restore@v4
83 - id: node_modules
84 - with:
85 - path: |
86 - **/node_modules
87 - key: runtime-and-compiler-node_modules-v8-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
88 - lookup-only: true
67 - uses: actions/setup-node@v4
90 - if: steps.node_modules.outputs.cache-hit != 'true'
68 with:
69 node-version-file: '.nvmrc'
93 - cache: yarn
94 - cache-dependency-path: |
95 - yarn.lock
96 - compiler/yarn.lock
97 - - name: Warm with old cache
98 - if: steps.node_modules.outputs.cache-hit != 'true'
99 - uses: actions/cache/restore@v4
70 + - name: Prepare cache
71 + id: node_modules
72 + uses: actions/cache@v4
73 with:
74 path: |
75 **/node_modules
103 - key: runtime-and-compiler-node_modules-v8-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
76 + key: runtime-and-compiler-node_modules-v9-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
77 # Don't use restore-keys here. Otherwise the cache grows indefinitely.
78 - run: yarn install --frozen-lockfile
79 if: steps.node_modules.outputs.cache-hit != 'true'
80 - run: yarn --cwd compiler install --frozen-lockfile
81 if: steps.node_modules.outputs.cache-hit != 'true'
109 - - name: Save cache
110 - if: steps.node_modules.outputs.cache-hit != 'true'
111 - uses: actions/cache/save@v4
112 - with:
113 - path: |
114 - **/node_modules
115 - key: runtime-and-compiler-node_modules-v8-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
82
83 # ----- FLOW -----
84 discover_flow_inline_configs:
@@ -146,15 +112,13 @@ jobs:
112 - uses: actions/setup-node@v4
113 with:
114 node-version-file: '.nvmrc'
149 - cache: yarn
150 - cache-dependency-path: yarn.lock
115 - name: Restore cached node_modules
116 uses: actions/cache/restore@v4
117 id: node_modules
118 with:
119 path: |
120 **/node_modules
157 - key: runtime-node_modules-v8-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
121 + key: runtime-node_modules-v9-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
122 # Don't use restore-keys here. Otherwise the cache grows indefinitely.
123 - name: Ensure clean build directory
124 run: rm -rf build
@@ -174,15 +138,13 @@ jobs:
138 - uses: actions/setup-node@v4
139 with:
140 node-version-file: '.nvmrc'
177 - cache: yarn
178 - cache-dependency-path: yarn.lock
141 - name: Restore cached node_modules
142 uses: actions/cache/restore@v4
143 id: node_modules
144 with:
145 path: |
146 **/node_modules
185 - key: runtime-node_modules-v8-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
147 + key: runtime-node_modules-v9-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
148 # Don't use restore-keys here. Otherwise the cache grows indefinitely.
149 - name: Ensure clean build directory
150 run: rm -rf build
@@ -204,15 +166,13 @@ jobs:
166 - uses: actions/setup-node@v4
167 with:
168 node-version-file: '.nvmrc'
207 - cache: yarn
208 - cache-dependency-path: yarn.lock
169 - name: Restore cached node_modules
170 uses: actions/cache/restore@v4
171 id: node_modules
172 with:
173 path: |
174 **/node_modules
215 - key: runtime-node_modules-v8-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
175 + key: runtime-node_modules-v9-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
176 - name: Ensure clean build directory
177 run: rm -rf build
178 - run: yarn install --frozen-lockfile
@@ -260,17 +220,13 @@ jobs:
220 - uses: actions/setup-node@v4
221 with:
222 node-version-file: '.nvmrc'
263 - cache: yarn
264 - cache-dependency-path: |
265 - yarn.lock
266 - compiler/yarn.lock
223 - name: Restore cached node_modules
224 uses: actions/cache/restore@v4
225 id: node_modules
226 with:
227 path: |
228 **/node_modules
273 - key: runtime-and-compiler-node_modules-v8-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
229 + key: runtime-and-compiler-node_modules-v9-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
230 # Don't use restore-keys here. Otherwise the cache grows indefinitely.
231 - name: Ensure clean build directory
232 run: rm -rf build
@@ -291,17 +247,13 @@ jobs:
247 - uses: actions/setup-node@v4
248 with:
249 node-version-file: '.nvmrc'
294 - cache: yarn
295 - cache-dependency-path: |
296 - yarn.lock
297 - compiler/yarn.lock
250 - name: Restore cached node_modules
299 - uses: actions/cache@v4
251 + uses: actions/cache/restore@v4
252 id: node_modules
253 with:
254 path: |
255 **/node_modules
304 - key: runtime-and-compiler-node_modules-v8-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
256 + key: runtime-and-compiler-node_modules-v9-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
257 - name: Install runtime dependencies
258 run: yarn install --frozen-lockfile
259 if: steps.node_modules.outputs.cache-hit != 'true'
@@ -330,10 +282,6 @@ jobs:
282 - uses: actions/setup-node@v4
283 with:
284 node-version-file: '.nvmrc'
333 - cache: yarn
334 - cache-dependency-path: |
335 - yarn.lock
336 - compiler/yarn.lock
285 - uses: actions/setup-java@v4
286 with:
287 distribution: temurin
@@ -344,7 +292,7 @@ jobs:
292 with:
293 path: |
294 **/node_modules
347 - key: runtime-and-compiler-node_modules-v8-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
295 + key: runtime-and-compiler-node_modules-v9-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
296 # Don't use restore-keys here. Otherwise the cache grows indefinitely.
297 - name: Ensure clean build directory
298 run: rm -rf build
@@ -420,17 +368,13 @@ jobs:
368 - uses: actions/setup-node@v4
369 with:
370 node-version-file: '.nvmrc'
423 - cache: yarn
424 - cache-dependency-path: |
425 - yarn.lock
426 - compiler/yarn.lock
371 - name: Restore cached node_modules
372 uses: actions/cache/restore@v4
373 id: node_modules
374 with:
375 path: |
376 **/node_modules
433 - key: runtime-and-compiler-node_modules-v8-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
377 + key: runtime-and-compiler-node_modules-v9-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }}
378 # Don't use restore-keys here. Otherwise the cache grows indefinitely.
379 - name: Ensure clean build directory
380 run: rm -rf build
@@ -469,15 +413,13 @@ jobs:
413 - uses: actions/setup-node@v4
414 with:
415 node-version-file: '.nvmrc'
472 - cache: yarn
473 - cache-dependency-path: yarn.lock
416 - name: Restore cached node_modules
417 uses: actions/cache/restore@v4
418 id: node_modules
419 with:
420 path: |
421 **/node_modules
480 - key: runtime-node_modules-v8-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
422 + key: runtime-node_modules-v9-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
423 # Don't use restore-keys here. Otherwise the cache grows indefinitely.
424 - name: Ensure clean build directory
425 run: rm -rf build
@@ -509,15 +451,13 @@ jobs:
451 - uses: actions/setup-node@v4
452 with:
453 node-version-file: '.nvmrc'
512 - cache: yarn
513 - cache-dependency-path: yarn.lock
454 - name: Restore cached node_modules
455 uses: actions/cache/restore@v4
456 id: node_modules
457 with:
458 path: |
459 **/node_modules
520 - key: runtime-node_modules-v8-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
460 + key: runtime-node_modules-v9-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
461 # Don't use restore-keys here. Otherwise the cache grows indefinitely.
462 - name: Ensure clean build directory
463 run: rm -rf build
@@ -572,15 +512,13 @@ jobs:
512 - uses: actions/setup-node@v4
513 with:
514 node-version-file: '.nvmrc'
575 - cache: yarn
576 - cache-dependency-path: yarn.lock
515 - name: Restore cached node_modules
516 uses: actions/cache/restore@v4
517 id: node_modules
518 with:
519 path: |
520 **/node_modules
583 - key: runtime-node_modules-v8-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
521 + key: runtime-node_modules-v9-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
522 # Don't use restore-keys here. Otherwise the cache grows indefinitely.
523 - name: Ensure clean build directory
524 run: rm -rf build
@@ -610,15 +548,13 @@ jobs:
548 - uses: actions/setup-node@v4
549 with:
550 node-version-file: '.nvmrc'
613 - cache: yarn
614 - cache-dependency-path: yarn.lock
551 - name: Restore cached node_modules
552 uses: actions/cache/restore@v4
553 id: node_modules
554 with:
555 path: |
556 **/node_modules
621 - key: runtime-node_modules-v8-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
557 + key: runtime-node_modules-v9-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
558 # Don't use restore-keys here. Otherwise the cache grows indefinitely.
559 - name: Ensure clean build directory
560 run: rm -rf build
@@ -645,8 +581,6 @@ jobs:
581 - uses: actions/setup-node@v4
582 with:
583 node-version-file: '.nvmrc'
648 - cache: yarn
649 - cache-dependency-path: yarn.lock
584 - name: Restore cached node_modules
585 uses: actions/cache@v4 # note: this does not reuse centralized cache since it has unique cache key
586 id: node_modules
@@ -686,8 +620,6 @@ jobs:
620 - uses: actions/setup-node@v4
621 with:
622 node-version-file: '.nvmrc'
689 - cache: yarn
690 - cache-dependency-path: yarn.lock
623 # Fixture copies some built packages from the workroot after install.
624 # That means dependencies of the built packages are not installed.
625 # We need to install dependencies of the workroot to fulfill all dependency constraints
@@ -760,15 +692,13 @@ jobs:
692 - uses: actions/setup-node@v4
693 with:
694 node-version-file: '.nvmrc'
763 - cache: yarn
764 - cache-dependency-path: yarn.lock
695 - name: Restore cached node_modules
696 uses: actions/cache/restore@v4
697 id: node_modules
698 with:
699 path: |
700 **/node_modules
771 - key: runtime-node_modules-v8-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
701 + key: runtime-node_modules-v9-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
702 # Don't use restore-keys here. Otherwise the cache grows indefinitely.
703 - name: Ensure clean build directory
704 run: rm -rf build
@@ -820,15 +750,13 @@ jobs:
750 - uses: actions/setup-node@v4
751 with:
752 node-version-file: '.nvmrc'
823 - cache: yarn
824 - cache-dependency-path: yarn.lock
753 - name: Restore cached node_modules
754 uses: actions/cache/restore@v4
755 id: node_modules
756 with:
757 path: |
758 **/node_modules
831 - key: runtime-node_modules-v8-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
759 + key: runtime-node_modules-v9-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
760 # Don't use restore-keys here. Otherwise the cache grows indefinitely.
761 - name: Ensure clean build directory
762 run: rm -rf build
@@ -878,8 +806,6 @@ jobs:
806 - uses: actions/setup-node@v4
807 with:
808 node-version-file: '.nvmrc'
881 - cache: yarn
882 - cache-dependency-path: yarn.lock
809 - name: Restore cached node_modules
810 uses: actions/cache@v4 # note: this does not reuse centralized cache since it has unique cache key
811 id: node_modules
.github/workflows/runtime_commit_artifacts.yml
+1 -1
@@ -37,7 +37,7 @@ jobs:
37 actions: read
38 steps:
39 - uses: actions/checkout@v4
40 - - name: Restore cached node_modules
40 + - name: Cache node_modules
41 uses: actions/cache@v4
42 id: node_modules
43 with:
.github/workflows/runtime_eslint_plugin_e2e.yml
+1 -5
@@ -37,11 +37,7 @@ jobs:
37 - uses: actions/setup-node@v4
38 with:
39 node-version-file: '.nvmrc'
40 - cache: yarn
41 - cache-dependency-path: |
42 - yarn.lock
43 - compiler/yarn.lock
44 - - name: Restore cached node_modules
40 + - name: Cache node_modules
41 uses: actions/cache@v4
42 id: node_modules
43 with:
.github/workflows/runtime_prereleases.yml
+1 -3
@@ -57,9 +57,7 @@ jobs:
57 - uses: actions/setup-node@v4
58 with:
59 node-version-file: '.nvmrc'
60 - cache: yarn
61 - cache-dependency-path: yarn.lock
62 - - name: Restore cached node_modules
60 + - name: Cache node_modules
61 uses: actions/cache@v4
62 id: node_modules
63 with:
.github/workflows/runtime_releases_from_npm_manual.yml
+1 -1
@@ -68,7 +68,7 @@ jobs:
68 node-version-file: '.nvmrc'
69 cache: yarn
70 cache-dependency-path: yarn.lock
71 - - name: Restore cached node_modules
71 + - name: Cache node_modules
72 uses: actions/cache@v4
73 id: node_modules
74 with:
.github/workflows/shared_lint.yml
+3 -11
@@ -25,9 +25,7 @@ jobs:
25 - uses: actions/setup-node@v4
26 with:
27 node-version-file: '.nvmrc'
28 - cache: yarn
29 - cache-dependency-path: yarn.lock
30 - - name: Restore cached node_modules
28 + - name: Cache node_modules
29 uses: actions/cache@v4
30 id: node_modules
31 with:
@@ -48,8 +46,6 @@ jobs:
46 - uses: actions/setup-node@v4
47 with:
48 node-version-file: '.nvmrc'
51 - cache: yarn
52 - cache-dependency-path: yarn.lock
49 - name: Restore cached node_modules
50 uses: actions/cache@v4
51 id: node_modules
@@ -71,9 +67,7 @@ jobs:
67 - uses: actions/setup-node@v4
68 with:
69 node-version-file: '.nvmrc'
74 - cache: yarn
75 - cache-dependency-path: yarn.lock
76 - - name: Restore cached node_modules
70 + - name: Cache node_modules
71 uses: actions/cache@v4
72 id: node_modules
73 with:
@@ -94,9 +88,7 @@ jobs:
88 - uses: actions/setup-node@v4
89 with:
90 node-version-file: '.nvmrc'
97 - cache: yarn
98 - cache-dependency-path: yarn.lock
99 - - name: Restore cached node_modules
91 + - name: Cache node_modules
92 uses: actions/cache@v4
93 id: node_modules
94 with: