[ci] Consistent cache names (#31239)
Makes cache names more descriptive and consistent for CI, so it's easier to tell which cache is used for what purpose. --- [//]: # (BEGIN SAPLING FOOTER) Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/react/pull/31239). * #31240 * __->__ #31239
lauren committed
Oct 14, 2024 at 12:07 UTC
cbcc1d2027c1d77abdf934b7f5e645882ffa4195
8 files changed
+29
-29
.github/workflows/compiler_playground.yml
+1
-1
@@ -33,7 +33,7 @@ jobs:
33
id: node_modules
34
with:
35
path: "**/node_modules"
36
- key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('compiler/**/yarn.lock') }}
36
+ key: compiler-node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('compiler/**/yarn.lock') }}
37
- name: yarn install compiler
38
run: yarn install --frozen-lockfile
39
working-directory: compiler
.github/workflows/compiler_prereleases.yml
+1
-1
@@ -44,7 +44,7 @@ jobs:
44
id: node_modules
45
with:
46
path: "**/node_modules"
47
- key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('compiler/**/yarn.lock') }}
47
+ key: compiler-node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('compiler/**/yarn.lock') }}
48
- run: yarn install --frozen-lockfile
49
- name: Publish packages to npm
50
run: |
.github/workflows/compiler_typescript.yml
+3
-3
@@ -43,7 +43,7 @@ jobs:
43
uses: actions/cache@v4
44
with:
45
path: "**/node_modules"
46
- key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('compiler/**/yarn.lock') }}
46
+ key: compiler-node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('compiler/**/yarn.lock') }}
47
- run: yarn install --frozen-lockfile
48
- run: yarn workspace babel-plugin-react-compiler lint
49
@@ -63,7 +63,7 @@ jobs:
63
id: node_modules
64
with:
65
path: "**/node_modules"
66
- key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('compiler/**/yarn.lock') }}
66
+ key: compiler-node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('compiler/**/yarn.lock') }}
67
- run: yarn install --frozen-lockfile
68
- run: yarn workspace babel-plugin-react-compiler jest
69
@@ -87,6 +87,6 @@ jobs:
87
id: node_modules
88
with:
89
path: "**/node_modules"
90
- key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('compiler/**/yarn.lock') }}
90
+ key: compiler-node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('compiler/**/yarn.lock') }}
91
- run: yarn install --frozen-lockfile
92
- run: yarn workspace ${{ matrix.workspace_name }} test
.github/workflows/devtools_regression_tests.yml
+4
-4
@@ -30,7 +30,7 @@ jobs:
30
id: node_modules
31
with:
32
path: "**/node_modules"
33
- key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('yarn.lock', 'scripts/release/yarn.lock') }}
33
+ key: runtime-release-node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'scripts/release/yarn.lock') }}
34
- run: yarn install --frozen-lockfile
35
- run: yarn install --frozen-lockfile
36
working-directory: scripts/release
@@ -62,7 +62,7 @@ jobs:
62
id: node_modules
63
with:
64
path: "**/node_modules"
65
- key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }}
65
+ key: runtime-node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
66
- run: yarn install --frozen-lockfile
67
- name: Restore archived build
68
uses: actions/download-artifact@v4
@@ -116,7 +116,7 @@ jobs:
116
id: node_modules
117
with:
118
path: "**/node_modules"
119
- key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }}
119
+ key: runtime-node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
120
- run: yarn install --frozen-lockfile
121
- name: Restore all archived build artifacts
122
uses: actions/download-artifact@v4
@@ -150,7 +150,7 @@ jobs:
150
id: node_modules
151
with:
152
path: "**/node_modules"
153
- key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }}
153
+ key: runtime-node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
154
- run: yarn install --frozen-lockfile
155
- name: Restore all archived build artifacts
156
uses: actions/download-artifact@v4
.github/workflows/runtime_build_and_test.yml
+14
-14
@@ -48,7 +48,7 @@ jobs:
48
id: node_modules
49
with:
50
path: "**/node_modules"
51
- key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }}
51
+ key: runtime-node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
52
- run: yarn install --frozen-lockfile
53
- run: node ./scripts/tasks/flow-ci ${{ matrix.flow_inline_config_shortname }}
54
@@ -68,7 +68,7 @@ jobs:
68
id: node_modules
69
with:
70
path: "**/node_modules"
71
- key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }}
71
+ key: runtime-node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
72
- run: yarn install --frozen-lockfile
73
- run: |
74
yarn generate-inline-fizz-runtime
@@ -90,7 +90,7 @@ jobs:
90
id: node_modules
91
with:
92
path: "**/node_modules"
93
- key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }}
93
+ key: runtime-node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
94
- run: yarn install --frozen-lockfile
95
- run: yarn flags
96
@@ -139,7 +139,7 @@ jobs:
139
id: node_modules
140
with:
141
path: "**/node_modules"
142
- key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }}
142
+ key: runtime-node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
143
- run: yarn install --frozen-lockfile
144
- run: yarn test ${{ matrix.params }} --ci --shard=${{ matrix.shard }}
145
@@ -168,7 +168,7 @@ jobs:
168
id: node_modules
169
with:
170
path: "**/node_modules"
171
- key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }}
171
+ key: runtime-node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
172
- run: yarn install --frozen-lockfile
173
- run: yarn build --index=${{ matrix.worker_id }} --total=20 --r=${{ matrix.release_channel }} --ci
174
env:
@@ -238,7 +238,7 @@ jobs:
238
id: node_modules
239
with:
240
path: "**/node_modules"
241
- key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }}
241
+ key: runtime-node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
242
- run: yarn install --frozen-lockfile
243
- name: Restore archived build
244
uses: actions/download-artifact@v4
@@ -266,7 +266,7 @@ jobs:
266
id: node_modules
267
with:
268
path: "**/node_modules"
269
- key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }}
269
+ key: runtime-node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
270
- run: yarn install --frozen-lockfile
271
- name: Restore archived build
272
uses: actions/download-artifact@v4
@@ -309,7 +309,7 @@ jobs:
309
id: node_modules
310
with:
311
path: "**/node_modules"
312
- key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }}
312
+ key: runtime-node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
313
- run: yarn install --frozen-lockfile
314
- name: Restore archived build
315
uses: actions/download-artifact@v4
@@ -340,7 +340,7 @@ jobs:
340
id: node_modules
341
with:
342
path: "**/node_modules"
343
- key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }}
343
+ key: runtime-node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
344
- run: yarn install --frozen-lockfile
345
- name: Restore archived build
346
uses: actions/download-artifact@v4
@@ -368,7 +368,7 @@ jobs:
368
id: node_modules
369
with:
370
path: "**/node_modules"
371
- key: v2-yarn_cache_fixtures_dom-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
371
+ key: fixtures_dom-node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
372
- run: yarn install --frozen-lockfile
373
- run: yarn install --frozen-lockfile --cache-folder ~/.cache/yarn
374
working-directory: fixtures/dom
@@ -408,7 +408,7 @@ jobs:
408
id: node_modules
409
with:
410
path: "**/node_modules"
411
- key: v2-yarn_cache_fixtures_flight-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
411
+ key: fixtures_flight-node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
412
- run: yarn install --frozen-lockfile
413
- name: Restore archived build
414
uses: actions/download-artifact@v4
@@ -464,7 +464,7 @@ jobs:
464
id: node_modules
465
with:
466
path: "**/node_modules"
467
- key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }}
467
+ key: runtime-node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
468
- run: yarn install --frozen-lockfile
469
- name: Restore archived build
470
uses: actions/download-artifact@v4
@@ -510,7 +510,7 @@ jobs:
510
id: node_modules
511
with:
512
path: "**/node_modules"
513
- key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }}
513
+ key: runtime-node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
514
- run: yarn install --frozen-lockfile
515
- name: Restore archived build
516
uses: actions/download-artifact@v4
@@ -581,7 +581,7 @@ jobs:
581
id: node_modules
582
with:
583
path: "**/node_modules"
584
- key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }}
584
+ key: runtime-node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
585
- run: yarn install --frozen-lockfile
586
- name: Restore archived build for PR
587
uses: actions/download-artifact@v4
.github/workflows/runtime_commit_artifacts.yml
+1
-1
@@ -74,7 +74,7 @@ jobs:
74
id: node_modules
75
with:
76
path: "**/node_modules"
77
- key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('yarn.lock', 'scripts/release/yarn.lock') }}
77
+ key: runtime-release-node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'scripts/release/yarn.lock') }}
78
- run: yarn install --frozen-lockfile
79
name: yarn install (react)
80
- run: yarn install --frozen-lockfile
.github/workflows/runtime_prereleases.yml
+1
-1
@@ -40,7 +40,7 @@ jobs:
40
id: node_modules
41
with:
42
path: "**/node_modules"
43
- key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('yarn.lock', 'scripts/release/yarn.lock') }}
43
+ key: runtime-release-node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'scripts/release/yarn.lock') }}
44
- run: yarn install --frozen-lockfile
45
- run: yarn install --frozen-lockfile
46
working-directory: scripts/release
.github/workflows/shared_lint.yml
+4
-4
@@ -25,7 +25,7 @@ jobs:
25
uses: actions/cache@v4
26
with:
27
path: "**/node_modules"
28
- key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
28
+ key: shared-lint-node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
29
- run: yarn install --frozen-lockfile
30
- run: yarn prettier-check
31
@@ -43,7 +43,7 @@ jobs:
43
uses: actions/cache@v4
44
with:
45
path: "**/node_modules"
46
- key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
46
+ key: shared-lint-node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
47
- run: yarn install --frozen-lockfile
48
- run: node ./scripts/tasks/eslint
49
@@ -61,7 +61,7 @@ jobs:
61
uses: actions/cache@v4
62
with:
63
path: "**/node_modules"
64
- key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
64
+ key: shared-lint-node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
65
- run: yarn install --frozen-lockfile
66
- run: ./scripts/ci/check_license.sh
67
@@ -79,6 +79,6 @@ jobs:
79
uses: actions/cache@v4
80
with:
81
path: "**/node_modules"
82
- key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
82
+ key: shared-lint-node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
83
- run: yarn install --frozen-lockfile
84
- run: ./scripts/ci/test_print_warnings.sh