88 runs-on : ubuntu-latest
99 steps :
1010 - name : Checkout code
11- uses : actions/checkout@v2
11+ uses : actions/checkout@v3
1212 - name : Use Node.js latest
13- uses : actions/setup-node@v2-beta
13+ uses : actions/setup-node@v3
1414 with :
1515 node-version : " *"
16- - name : Get yarn cache directory path
17- id : yarn-cache-dir-path
18- run : echo "::set-output name=dir::$(yarn config get cacheFolder)"
19- - uses : actions/cache@v2
20- id : yarn-cache
21- with :
22- path : ${{ steps.yarn-cache-dir-path.outputs.dir }}
23- key : yarn-${{ hashFiles('yarn.lock') }}
24- restore-keys : |
25- yarn-
16+ cache : " yarn"
2617 - name : ' Check or update Yarn cache (fix w/ "yarn install")'
2718 env :
2819 YARN_ENABLE_SCRIPTS : false # disable post-install scripts
@@ -36,16 +27,16 @@ jobs:
3627 runs-on : ubuntu-latest
3728 steps :
3829 - name : Checkout code
39- uses : actions/checkout@v2
30+ uses : actions/checkout@v3
4031 - name : Use Node.js latest
41- uses : actions/setup-node@v2-beta
32+ uses : actions/setup-node@v3
4233 with :
4334 node-version : " *"
35+ cache : " yarn"
4436 - name : ' Check for unmet constraints (fix w/ "yarn constraints --fix")'
4537 run : |
4638 yarn constraints
4739 - name : ' Check for duplicate dependencies (fix w/ "yarn dedupe")'
48- if : steps.yarn-cache.outputs.cache-hit != 'true'
4940 run : |
5041 yarn dedupe --check
5142 - name : Check for dependency cycles
@@ -58,18 +49,12 @@ jobs:
5849 runs-on : ubuntu-latest
5950 steps :
6051 - name : Checkout code
61- uses : actions/checkout@v2
52+ uses : actions/checkout@v3
6253 - name : Use Node.js latest
63- uses : actions/setup-node@v2-beta
54+ uses : actions/setup-node@v3
6455 with :
6556 node-version : 17
66- - name : Get yarn cache directory path
67- id : yarn-cache-dir-path
68- run : echo "::set-output name=dir::$(yarn config get cacheFolder)"
69- - uses : actions/cache@v2
70- with :
71- path : ${{ steps.yarn-cache-dir-path.outputs.dir }}
72- key : yarn-${{ hashFiles('yarn.lock') }}
57+ cache : " yarn"
7358 - name : Generate coverage report
7459 run : |
7560 make -j test-ci-coverage
@@ -86,20 +71,12 @@ jobs:
8671 # YARN_NODE_LINKER: pnp # use pnp linker for better linking performance and stricter checks
8772 steps :
8873 - name : Checkout code
89- uses : actions/checkout@v2
74+ uses : actions/checkout@v3
9075 - name : Use Node.js latest
91- uses : actions/setup-node@v2-beta
76+ uses : actions/setup-node@v3
9277 with :
9378 node-version : " *"
94- - name : Get yarn cache directory path
95- id : yarn-cache-dir-path
96- run : echo "::set-output name=dir::$(yarn config get cacheFolder)"
97- - uses : actions/cache@v2
98- with :
99- path : ${{ steps.yarn-cache-dir-path.outputs.dir }}
100- key : yarn-${{ hashFiles('yarn.lock') }}
101- restore-keys : |
102- yarn-
79+ cache : " yarn"
10380 - name : Build babel artifacts
10481 run : |
10582 BABEL_ENV=test-legacy make -j build-standalone-ci
10986 - name : Ensure cwd does not contain uncommitted changes
11087 run : |
11188 ./scripts/assert-dir-git-clean.sh
112- - uses : actions/upload-artifact@v2
89+ - uses : actions/upload-artifact@v3
11390 with :
11491 name : babel-artifact
11592 path : |
@@ -125,19 +102,15 @@ jobs:
125102 runs-on : ubuntu-latest
126103 steps :
127104 - name : Checkout code
128- uses : actions/checkout@v2
105+ uses : actions/checkout@v3
129106 - name : Use Node.js latest
130- uses : actions/setup-node@v2-beta
131- - name : Get yarn cache directory path
132- id : yarn-cache-dir-path
133- run : echo "::set-output name=dir::$(yarn config get cacheFolder)"
134- - uses : actions/cache@v2
107+ uses : actions/setup-node@v3
135108 with :
136- path : ${{ steps.yarn-cache-dir-path.outputs.dir }}
137- key : yarn-${{ hashFiles('yarn.lock') }}
109+ node-version : " * "
110+ cache : " yarn"
138111 - name : Install
139112 run : yarn install
140- - uses : actions/download-artifact@v2
113+ - uses : actions/download-artifact@v3
141114 with :
142115 name : babel-artifact
143116 - name : Lint
@@ -152,18 +125,12 @@ jobs:
152125 node-version : [16, 14, 12, 10, 8, 6]
153126 steps :
154127 - name : Checkout code
155- uses : actions/checkout@v2
128+ uses : actions/checkout@v3
156129 - name : Use Node.js latest # Run yarn on latest node
157- uses : actions/setup-node@v2-beta
130+ uses : actions/setup-node@v3
158131 with :
159132 node-version : " *" # Build Babel on latest node LTS versions
160- - name : Get yarn cache directory path
161- id : yarn-cache-dir-path
162- run : echo "::set-output name=dir::$(yarn config get cacheFolder)"
163- - uses : actions/cache@v2
164- with :
165- path : ${{ steps.yarn-cache-dir-path.outputs.dir }}
166- key : yarn-${{ hashFiles('yarn.lock') }}
133+ cache : " yarn"
167134 - name : Install
168135 run : |
169136 yarn install
@@ -175,14 +142,14 @@ jobs:
175142 # Deduplicate dependencies, because duplicate copies of graceful-fs cause
176143 # problems with the "path" module: https://github.com/facebook/jest/issues/9656
177144 yarn dedupe
178- - uses : actions/download-artifact@v2
145+ - uses : actions/download-artifact@v3
179146 with :
180147 name : babel-artifact
181148 - name : Generate runtime helpers
182149 run : |
183150 make build-plugin-transform-runtime-dist
184151 - name : Use Node.js ${{ matrix.node-version }} # Checkout node version for test executor
185- uses : actions/setup-node@v2-beta
152+ uses : actions/setup-node@v3
186153 with :
187154 node-version : ${{ matrix.node-version }}
188155 - name : Test on node.js ${{ matrix.node-version }}
@@ -194,25 +161,24 @@ jobs:
194161 BABEL_ENV=test node --max-old-space-size=4096 ./node_modules/.bin/jest --ci --color
195162 env :
196163 TEST_FUZZ : " ${{ (matrix.node-version == '6' || matrix.node-version == '8' || matrix.node-version == '10') && 'false' || 'true' }}"
164+ - name : Use Node.js latest # For `yarn version` in post actions of the first actions/setup-node
165+ if : matrix.node-version == '6' || matrix.node-version == '8' || matrix.node-version == '10'
166+ uses : actions/setup-node@v3
167+ with :
168+ node-version : " *"
197169
198170 test-babel-8-breaking :
199171 name : Test Babel 8 breaking changes
200172 needs : prepare-yarn-cache
201173 runs-on : ubuntu-latest
202174 steps :
203175 - name : Checkout code
204- uses : actions/checkout@v2
176+ uses : actions/checkout@v3
205177 - name : Use Node.js 14.17
206- uses : actions/setup-node@v2-beta
178+ uses : actions/setup-node@v3
207179 with :
208180 node-version : " 14.17" # Node.js 14.17 is the first LTS supported by Babel 8
209- - name : Get yarn cache directory path
210- id : yarn-cache-dir-path
211- run : echo "::set-output name=dir::$(yarn config get cacheFolder)"
212- - uses : actions/cache@v2
213- with :
214- path : ${{ steps.yarn-cache-dir-path.outputs.dir }}
215- key : yarn-${{ hashFiles('yarn.lock') }}
181+ cache : " yarn"
216182 - name : Install and build
217183 run : make -j bootstrap
218184 env :
@@ -242,19 +208,15 @@ jobs:
242208 runs-on : windows-latest
243209 steps :
244210 - name : Checkout code
245- uses : actions/checkout@v2
246- - name : Use Node.js latest
247- uses : actions/setup-node@v2-beta
248- - name : Get yarn cache directory path
249- id : yarn-cache-dir-path
250- run : echo "::set-output name=dir::$(yarn config get cacheFolder)"
251- - uses : actions/cache@v2
211+ uses : actions/checkout@v3
212+ - name : Use Node.js 16
213+ uses : actions/setup-node@v3
252214 with :
253- path : ${{ steps.yarn-cache-dir-path.outputs.dir }}
254- key : yarn-${{ hashFiles('yarn.lock') }}
215+ node-version : 16
216+ cache : " yarn"
255217 - name : Install
256218 run : yarn install
257- - uses : actions/download-artifact@v2
219+ - uses : actions/download-artifact@v3
258220 with :
259221 name : babel-artifact
260222 - name : Generate runtime helpers
@@ -273,19 +235,15 @@ jobs:
273235 runs-on : ubuntu-latest
274236 steps :
275237 - name : Checkout code
276- uses : actions/checkout@v2
238+ uses : actions/checkout@v3
277239 - name : Use Node.js latest
278- uses : actions/setup-node@v2-beta
279- - name : Get yarn cache directory path
280- id : yarn-cache-dir-path
281- run : echo "::set-output name=dir::$(yarn config get cacheFolder)"
282- - uses : actions/cache@v2
240+ uses : actions/setup-node@v3
283241 with :
284- path : ${{ steps.yarn-cache-dir-path.outputs.dir }}
285- key : yarn-${{ hashFiles('yarn.lock') }}
242+ node-version : " * "
243+ cache : " yarn"
286244 - name : Install
287245 run : yarn install
288- - uses : actions/download-artifact@v2
246+ - uses : actions/download-artifact@v3
289247 with :
290248 name : babel-artifact
291249 - name : Download tests
@@ -303,18 +261,12 @@ jobs:
303261 runs-on : ubuntu-latest
304262 steps :
305263 - name : Checkout code
306- uses : actions/checkout@v2
264+ uses : actions/checkout@v3
307265 - name : Use Node.js latest
308- uses : actions/setup-node@v2-beta
266+ uses : actions/setup-node@v3
309267 with :
310268 node-version : " *"
311- - name : Get yarn cache directory path
312- id : yarn-cache-dir-path
313- run : echo "::set-output name=dir::$(yarn config get cacheFolder)"
314- - uses : actions/cache@v2
315- with :
316- path : ${{ steps.yarn-cache-dir-path.outputs.dir }}
317- key : yarn-${{ hashFiles('yarn.lock') }}
269+ cache : " yarn"
318270 # See https://github.com/babel/babel/pull/12906
319271 - name : Support self-references on old Node.js
320272 run : |
@@ -336,7 +288,7 @@ jobs:
336288 # The "Support self-references on old Node.js" step mutates the
337289 # package.json file, causing a yarn.lock update.
338290 YARN_ENABLE_IMMUTABLE_INSTALLS : false
339- - uses : actions/download-artifact@v2
291+ - uses : actions/download-artifact@v3
340292 with :
341293 name : babel-artifact
342294 - name : Generate runtime helpers
@@ -349,61 +301,61 @@ jobs:
349301 - name : Test Node.js
350302 run : yarn test:runtime:node
351303 - name : Use Node.js 10
352- uses : actions/setup-node@v2-beta
304+ uses : actions/setup-node@v3
353305 with :
354306 node-version : 10
355307 - name : Test Node.js 10
356308 run : node test/runtime-integration/node.cjs
357309 - name : Use Node.js 12.0
358- uses : actions/setup-node@v2-beta
310+ uses : actions/setup-node@v3
359311 with :
360312 node-version : " 12.0" # quoted, otherwise it's just 13
361313 - name : Test Node.js 12.0
362314 run : yarn test:runtime:node
363315 - name : Use Node.js 12.17
364- uses : actions/setup-node@v2-beta
316+ uses : actions/setup-node@v3
365317 with :
366318 node-version : 12.17
367319 - name : Test Node.js 12.17
368320 run : yarn test:runtime:node
369321 - name : Use Node.js 13.0
370- uses : actions/setup-node@v2-beta
322+ uses : actions/setup-node@v3
371323 with :
372324 node-version : " 13.0" # quoted, otherwise it's just 13
373325 - name : Test Node.js 13.0
374326 run : yarn test:runtime:node
375327 - name : Use Node.js 13.2
376- uses : actions/setup-node@v2-beta
328+ uses : actions/setup-node@v3
377329 with :
378330 node-version : 13.2
379331 - name : Test Node.js 13.2
380332 run : yarn test:runtime:node
381333 - name : Use Node.js 13.6
382- uses : actions/setup-node@v2-beta
334+ uses : actions/setup-node@v3
383335 with :
384336 node-version : 13.6
385337 - name : Test Node.js 13.6
386338 run : yarn test:runtime:node
387339 - name : Use Node.js 13.7
388- uses : actions/setup-node@v2-beta
340+ uses : actions/setup-node@v3
389341 with :
390342 node-version : 13.7
391343 - name : Test Node.js 13.7
392344 run : yarn test:runtime:node
393345 - name : Use Node.js 14.2
394- uses : actions/setup-node@v2-beta
346+ uses : actions/setup-node@v3
395347 with :
396348 node-version : 14.2
397349 - name : Test Node.js 14.2
398350 run : yarn test:runtime:node
399351 - name : Use Node.js 16.5
400- uses : actions/setup-node@v2-beta
352+ uses : actions/setup-node@v3
401353 with :
402354 node-version : 16.5
403355 - name : Test Node.js 16.5
404356 run : yarn test:runtime:node
405357 - name : Use Node.js 16.6
406- uses : actions/setup-node@v2-beta
358+ uses : actions/setup-node@v3
407359 with :
408360 node-version : 16.6
409361 - name : Test Node.js 16.6
0 commit comments