Repository navigation
791 lines (766 loc) · 24.8 KB
/
Copy pathci.yml
File metadata and controls
791 lines (766 loc) · 24.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
name: CI
on:
push:
branches: ["main"]
pull_request:
merge_group:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
prepare-yarn-cache:
name: Prepare Cache
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v7
- name: Use Node.js latest
uses: actions/setup-node@v7
with:
node-version: 26
check-latest: true
cache: "yarn"
- name: 'Check or update Yarn cache (fix w/ "yarn install")'
env:
YARN_ENABLE_HARDENED_MODE: true # enable hardened mode as CI may run on untrusted repos
YARN_ENABLE_SCRIPTS: false # disable post-install scripts
YARN_NODE_LINKER: pnp # use pnp linker for better linking performance: it's meant to update yarn cache only
run: |
yarn install --mode=skip-build
yarn-validate:
name: Validate Yarn dependencies and constraints
needs: prepare-yarn-cache
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v7
- name: Use Node.js latest
uses: actions/setup-node@v7
with:
node-version: 26
check-latest: true
cache: "yarn"
- name: 'Check for unmet constraints (fix w/ "yarn constraints --fix")'
run: |
yarn constraints
- name: 'Check for duplicate dependencies (fix w/ "yarn dedupe")'
run: |
yarn dedupe --check
- name: Check for dependency cycles
# todo: investigate why we need to install dependencies here to not get
# the following error:
# Internal Error: chalk@condition:BABEL_8_BREAKING ?[...]: This package
# doesn't seem to be present in your lockfile; run "yarn install" to
# update the lockfile
run: |
yarn
yarn release-tool check-cycles
build:
name: Build Babel Artifacts
needs: prepare-yarn-cache
runs-on: ubuntu-latest
# Yarn PnP does not support native ESM yet (https://github.com/yarnpkg/berry/issues/638)
# env:
# YARN_NODE_LINKER: pnp # use pnp linker for better linking performance and stricter checks
steps:
- name: Checkout code
uses: actions/checkout@v7
- name: Use Node.js latest
uses: actions/setup-node@v7
with:
node-version: 26
check-latest: true
cache: "yarn"
- name: Build babel artifacts
run: |
make -j build-standalone-ci
env:
BABEL_ENV: test-legacy
BABEL_9_BREAKING: false
STRIP_BABEL_VERSION_FLAG: true
- name: Build Makefile.js
run: |
node ./scripts/pack-script.ts
- name: Generate readmes
run: |
make generate-readme
- name: Generate .npmignore
run: |
node scripts/generators/npm-ignore.ts
- name: Cleanup fixtures
run: |
node scripts/cleanup-fixtures.ts
- name: Ensure cwd does not contain uncommitted changes
run: |
node ./scripts/assert-dir-git-clean.ts "\`make build\` and \`node scripts/cleanup-fixtures.ts\`"
- uses: actions/upload-artifact@v7
with:
name: babel-artifact
path: |
codemods/*/lib/**/*
eslint/*/lib/**/*
packages/*/lib/**/*
packages/babel-standalone/*.js
packages/babel-runtime/**/*.js
packages/babel-runtime-corejs3/**/*.js
!**/node_modules/**
retention-days: 5
build-windows:
name: Build Babel Artifacts on Windows
runs-on: windows-latest
# Yarn PnP does not support native ESM yet (https://github.com/yarnpkg/berry/issues/638)
# env:
# YARN_NODE_LINKER: pnp # use pnp linker for better linking performance and stricter checks
steps:
- name: Checkout code
uses: actions/checkout@v7
- name: Use Node.js latest
uses: actions/setup-node@v7
with:
node-version: 26
check-latest: true
cache: "yarn"
- name: Build babel artifacts
shell: bash
run: |
make -j build-standalone-ci
env:
BABEL_ENV: test-legacy
BABEL_9_BREAKING: false
STRIP_BABEL_VERSION_FLAG: true
- name: Ensure cwd does not contain uncommitted changes
run: |
node ./scripts/assert-dir-git-clean.ts build
prepublish-windows:
name: Prepublish on Windows
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v7
- name: Use Node.js latest
uses: actions/setup-node@v7
with:
node-version: 26
check-latest: true
cache: "yarn"
- name: Install
run: yarn install
- name: Prepublish
# Linting is done by the "Lint" job
run: make prepublish-no-lint
lint:
name: Lint
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v7
- name: Use Node.js latest
uses: actions/setup-node@v7
with:
node-version: 26
check-latest: true
cache: "yarn"
- name: Install
run: yarn install
- uses: actions/download-artifact@v8
with:
name: babel-artifact
- name: Lint
run: make -j lint-ci check-compat-data
- name: Ensure cwd does not contain uncommitted changes
run: |
node ./scripts/assert-dir-git-clean.ts "lint-ci check-compat-data"
- name: Compile agentic workflows
env:
GH_TOKEN: ${{ github.token }}
run: |
# Use the same gh-aw version that generated the committed lock files
versions=$(grep -ho '^# This file was automatically generated by gh-aw (v[^)]*)' .github/workflows/*.lock.yml | sed 's/.*(\(.*\))/\1/' | sort -u)
if [ "$(echo "$versions" | wc -l)" -ne 1 ]; then
echo "The agentic workflows lock files were generated by different gh-aw versions:"
echo "$versions"
echo 'Please re-run "gh aw compile" with a single version'
exit 1
fi
gh extension install github/gh-aw --pin "$versions"
gh aw compile
- name: Ensure agentic workflows are compiled
run: |
node ./scripts/assert-dir-git-clean.ts "gh aw compile"
test-coverage:
name: Test on Node.js Latest (with coverage)
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v7
- name: Use Node.js latest
uses: actions/setup-node@v7
with:
node-version: 26
check-latest: true
cache: "yarn"
- name: Install
run: |
yarn install
- uses: actions/download-artifact@v8
with:
name: babel-artifact
- name: Run tests
run: |
yarn c8 jest --ci
yarn test:esm
env:
BABEL_ENV: test
BABEL_COVERAGE: true
- name: Upload coverage report
uses: codecov/codecov-action@v7
with:
token: ${{ secrets.CODECOV_TOKEN }}
name: babel-7
test:
name: Test on Node.js ${{matrix.node-version}}
needs: build
runs-on: ubuntu-latest
# Unreleased Node.js versions are tested, but their failures do not fail the CI
continue-on-error: ${{ matrix.allow-failure == true }}
strategy:
fail-fast: false
matrix:
node-version: [24, 22]
include:
- node-version: "^27.0.0-alpha"
allow-failure: true
steps:
- name: Checkout code
uses: actions/checkout@v7
- name: Use Node.js latest # Run yarn on latest node
uses: actions/setup-node@v7
with:
node-version: 26
check-latest: true
cache: "yarn"
- name: Install
run: |
yarn install
- uses: actions/download-artifact@v8
with:
name: babel-artifact
- name: Use Node.js ${{ matrix.node-version }} # Checkout node version for test executor
uses: actions/setup-node@v7
with:
node-version: ${{ matrix.node-version }}
- name: Ensure that @babel/node's list of node flags is up to date
run: |
node ./packages/babel-node/scripts/list-node-flags.js
- name: Test on node.js ${{ matrix.node-version }}
# Todo(Babel 8): Jest execution path is hardcoded because Yarn 2 does not support node 6
run: |
node ./node_modules/.bin/jest --ci
env:
BABEL_ENV: test
TEST_FUZZ: true
test-windows-mac:
name: Test on
needs: build
strategy:
fail-fast: false
matrix:
os: [windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v7
- name: Use Node.js latest
uses: actions/setup-node@v7
with:
node-version: 26
check-latest: true
cache: "yarn"
- name: Install
run: yarn install
- uses: actions/download-artifact@v8
with:
name: babel-artifact
- name: Test
run: yarn jest --ci
env:
BABEL_ENV: test
build-babel9:
name: Build Babel 9 Artifacts
needs: prepare-yarn-cache
runs-on: ubuntu-latest
# Yarn PnP does not support native ESM yet (https://github.com/yarnpkg/berry/issues/638)
# env:
# YARN_NODE_LINKER: pnp # use pnp linker for better linking performance and stricter checks
steps:
- name: Checkout code
uses: actions/checkout@v7
- name: Use Node.js latest
uses: actions/setup-node@v7
with:
node-version: 26
check-latest: true
cache: "yarn"
- name: Build babel artifacts
run: |
make -j build-standalone-ci
env:
BABEL_ENV: test-legacy
BABEL_9_BREAKING: true
STRIP_BABEL_VERSION_FLAG: true
- uses: actions/upload-artifact@v7
with:
name: babel9-artifact
path: |
codemods/*/lib/**/*
eslint/*/lib/**/*
packages/*/lib/**/*
packages/babel-standalone/*.js
packages/babel-runtime/**/*.js
packages/babel-runtime-corejs3/**/*.js
!**/node_modules/**
retention-days: 5
lint-babel9:
name: Lint (Babel 9)
needs: build-babel9
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v7
- name: Use Node.js latest
uses: actions/setup-node@v7
with:
node-version: 26
check-latest: true
cache: "yarn"
- name: Install
run: yarn install
- uses: actions/download-artifact@v8
with:
name: babel9-artifact
- name: Lint
run: make -j lint-ci check-compat-data
env:
BABEL_ENV: test
BABEL_9_BREAKING: true
test-babel9-coverage:
name: Test Babel 9 changes (with coverage)
needs: build-babel9
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v7
- name: Use Node.js latest
uses: actions/setup-node@v7
with:
node-version: 26
check-latest: true
cache: "yarn"
- name: Install
run: |
yarn install
- uses: actions/download-artifact@v8
with:
name: babel9-artifact
- name: Run tests
run: |
yarn c8 jest --ci
env:
BABEL_ENV: test
BABEL_COVERAGE: true
BABEL_9_BREAKING: true
- name: Upload coverage report
uses: codecov/codecov-action@v7
with:
token: ${{ secrets.CODECOV_TOKEN }}
name: babel-9
test-babel9-windows-mac:
name: Test Babel 9 changes
needs: build-babel9
strategy:
fail-fast: false
matrix:
os: [windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v7
- name: Use Node.js latest
uses: actions/setup-node@v7
with:
node-version: 26
check-latest: true
cache: "yarn"
- name: Install
run: yarn install
- uses: actions/download-artifact@v8
with:
name: babel9-artifact
- name: Test
run: yarn jest --ci
env:
BABEL_ENV: test
BABEL_9_BREAKING: true
external-parser-tests:
name: Third-party Parser Tests
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v7
- name: Use Node.js latest
uses: actions/setup-node@v7
with:
node-version: 26
check-latest: true
cache: "yarn"
- name: Install
run: yarn install
- uses: actions/download-artifact@v8
with:
name: babel-artifact
- name: Download tests
run: make -j bootstrap-flow bootstrap-typescript bootstrap-test262
- name: Run Test262 Tests
run: make test-test262
- name: Run Flow Tests
run: make test-flow
- name: Run TypeScript Tests
run: make test-typescript
runtime-interop:
name: Test @babel/runtime integrations
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v7
- name: Use Node.js latest
uses: actions/setup-node@v7
with:
node-version: 26
check-latest: true
cache: "yarn"
# See https://github.com/babel/babel/pull/12906
- name: Support self-references on old Node.js
run: |
echo '{
"type": "commonjs",
"private": true,
"devDependencies": {
"@babel/runtime": "workspace:^",
"@babel/runtime-corejs3": "workspace:^"
}
}' > packages/package.json
node -e "
const pkg = require('./package.json');
pkg.workspaces.push('packages');
fs.writeFileSync('package.json', JSON.stringify(pkg, null, 2))
"
- name: Install
run: yarn install
env:
# The "Support self-references on old Node.js" step mutates the
# package.json file, causing a yarn.lock update.
YARN_ENABLE_IMMUTABLE_INSTALLS: false
- uses: actions/download-artifact@v8
with:
name: babel-artifact
- name: Generate absoluteRuntime tests
run: yarn test:runtime:generate-absolute-runtime
- name: Test bundlers
run: yarn test:runtime:bundlers
- name: Test Node.js latest
run: node test/runtime-integration/node.cjs
- name: Test older Node.js versions
if: ${{ !cancelled() }}
run: node test/runtime-integration/node-versions.mjs
eslint-version-test:
name: Test @babel/eslint-* with ESLint
needs: build
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
eslint-version: [9]
steps:
- name: Checkout code
uses: actions/checkout@v7
- name: Use Node.js latest
uses: actions/setup-node@v7
with:
node-version: 26
cache: "yarn"
- name: Install
run: yarn install
- uses: actions/download-artifact@v8
with:
name: babel-artifact
- name: Downgrade ESLint to ${{ matrix.eslint-version }}
run: yarn up eslint@catalog:babel-eslint--${{ matrix.eslint-version }} eslint-plugin-import@catalog:babel-eslint--${{ matrix.eslint-version }} @eslint/js@catalog:babel-eslint--${{ matrix.eslint-version }}
- name: Run babel/eslint tests
run: node ./node_modules/.bin/jest eslint
test262-prepare:
name: test262 - Prepare for running in parallel
runs-on: ubuntu-latest
if: github.repository == 'babel/babel'
outputs:
test262-commit: ${{ steps.test262-commit.outputs.sha1 }}
steps:
- name: Checkout Babel
uses: actions/checkout@v7
- name: Use Node.js latest
uses: actions/setup-node@v7
with:
node-version: 26
check-latest: true
- name: Checkout test runner
uses: actions/checkout@v7
with:
repository: babel/babel-test262-runner
path: babel-test262-runner
ref: main
- name: Download test262
run: make bootstrap-test262
- name: Get test262 commit
id: test262-commit
run: echo "sha1=$(git -C build/test262 rev-parse HEAD)" >> $GITHUB_OUTPUT
- name: Prepare test262 chunks
run: |
cd babel-test262-runner
npm ci
node lib/prepare-chunks 8 > ~/test262-chunks.json
env:
TEST262_PATH: ../build/test262
- name: Upload chunks artifact
uses: actions/upload-artifact@v7
with:
name: test262-chunks
path: ~/test262-chunks.json
retention-days: 30
test262:
name: test262
strategy:
matrix:
chunk: [0, 1, 2, 3, 4, 5, 6, 7]
runs-on: ubuntu-latest
needs: [build, test262-prepare]
steps:
- name: Checkout Babel
uses: actions/checkout@v7
- name: Use Node.js latest
uses: actions/setup-node@v7
with:
node-version: 26
check-latest: true
- name: Install
run: yarn install
- uses: actions/download-artifact@v8
with:
name: babel-artifact
- name: Checkout test runner
uses: actions/checkout@v7
with:
repository: babel/babel-test262-runner
path: babel-test262-runner
ref: main
- name: Install test runner
run: |
cd babel-test262-runner
npm ci
node lib/download-node
- name: Download test262
run: make bootstrap-test262
- name: Download chunks file
uses: actions/download-artifact@v8
with:
name: test262-chunks
- name: Restore test262 result cache
uses: actions/cache/restore@v6
with:
path: babel-test262-runner/cache.lmdb*
key: test262-${{ matrix.chunk }}-${{ hashFiles('babel-test262-runner/package-lock.json', 'babel-test262-runner/lib/run-tests/**') }}-${{ github.sha }}
restore-keys: test262-${{ matrix.chunk }}-${{ hashFiles('babel-test262-runner/package-lock.json', 'babel-test262-runner/lib/run-tests/**') }}-
- name: Run test262
run: |
cd babel-test262-runner
node lib/run-tests I_AM_SURE | tee ~/test262-${{ matrix.chunk }}.tap
# Specify bash to enable pipefail, so that "| tee" does not suppress the failure exit code.
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsshell
shell: bash
env:
BABEL_PATH: ".."
TEST262_PATH: ../build/test262
THREADS: 4
CHUNKS_FILE: ../test262-chunks.json
CHUNK: ${{ matrix.chunk }}
- name: Save test262 result cache
if: github.ref == 'refs/heads/main'
uses: actions/cache/save@v6
with:
path: babel-test262-runner/cache.lmdb*
key: test262-${{ matrix.chunk }}-${{ hashFiles('babel-test262-runner/package-lock.json', 'babel-test262-runner/lib/run-tests/**') }}-${{ github.sha }}
- name: Create artifact with report results
uses: actions/upload-artifact@v7
with:
name: test262-result-${{ matrix.chunk }}
path: ~/test262-${{ matrix.chunk }}.tap
retention-days: 30
test262-finish:
name: test262 - Analyze results
runs-on: ubuntu-latest
needs: [test262-prepare, test262]
steps:
- uses: actions/download-artifact@v8
with: { name: test262-result-0 }
- uses: actions/download-artifact@v8
with: { name: test262-result-1 }
- uses: actions/download-artifact@v8
with: { name: test262-result-2 }
- uses: actions/download-artifact@v8
with: { name: test262-result-3 }
- uses: actions/download-artifact@v8
with: { name: test262-result-4 }
- uses: actions/download-artifact@v8
with: { name: test262-result-5 }
- uses: actions/download-artifact@v8
with: { name: test262-result-6 }
- uses: actions/download-artifact@v8
with: { name: test262-result-7 }
- name: Merge chunk results
run: |
cat test262-0.tap test262-1.tap test262-2.tap test262-3.tap \
test262-4.tap test262-5.tap test262-6.tap test262-7.tap \
| npx tap-merge > test262.tap
- name: Create artifact with report results
uses: actions/upload-artifact@v7
with:
name: test262-result
path: test262.tap
- name: Checkout test runner
uses: actions/checkout@v7
with:
repository: babel/babel-test262-runner
path: babel-test262-runner
ref: main
- name: Download previous results
run: |
cd babel-test262-runner
npm ci
node lib/download-main-artifact/index.mjs ~/test262-main.tap
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Compare previous main branch & current results
id: compare
run: |
cd babel-test262-runner
node lib/compare-results ~/test262-main.tap ../test262.tap | tee ~/diff.tap
# Specify bash to enable pipefail, so that "| tee" does not suppress the failure exit code.
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsshell
shell: bash
# The comment is posted by the "Test262 comment" workflow, since this one
# does not have write permissions when running on PRs from forks.
- name: Prepare data for the PR comment
if: ${{ !cancelled() && github.event_name == 'pull_request' && steps.compare.outcome != 'skipped' }}
run: |
mkdir ~/test262-comment-data
cp ~/diff.tap ~/test262-comment-data/diff.tap
echo "$PR_NUMBER" > ~/test262-comment-data/pr-number
echo "$TEST262_COMMIT" > ~/test262-comment-data/test262-commit
env:
PR_NUMBER: ${{ github.event.pull_request.number }}
TEST262_COMMIT: ${{ needs.test262-prepare.outputs.test262-commit }}
- name: Upload data for the PR comment
if: ${{ !cancelled() && github.event_name == 'pull_request' && steps.compare.outcome != 'skipped' }}
uses: actions/upload-artifact@v7
with:
name: test262-comment-data
path: ~/test262-comment-data
retention-days: 1
ensure-npm-packages-exist:
name: Ensure npm packages exist
needs: yarn-validate
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v7
- name: Use Node.js latest
uses: actions/setup-node@v7
with:
node-version: 26
check-latest: true
cache: "yarn"
- name: Install
run: yarn install
- name: Ensure npm packages exist
run: |
node ./scripts/ensure-packages-exist.ts --check-only
publint:
name: Publint
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v7
- name: Use Node.js latest
uses: actions/setup-node@v7
with:
node-version: 26
cache: "yarn"
- name: Build
# Linting is done by the "Lint" job
run: make prepublish-no-lint
- name: Publint
run: node ./scripts/publint.ts
codspeed:
name: Codspeed
runs-on: codspeed-macro-arm64-graviton-ubuntu-22-04
needs: prepare-yarn-cache
# CodSpeed does not support the merge_group event
if: github.event_name != 'merge_group'
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Use Node.js latest
uses: actions/setup-node@v4
with:
node-version: 26
check-latest: true
cache: "yarn"
- name: Install
run: yarn install
- name: Build
run: yarn gulp build
env:
NODE_ENV: "production"
BABEL_ENV: "production"
STRIP_BABEL_VERSION_FLAG: "true"
IS_PUBLISH: "true"
- name: Run benchmarks
uses: CodSpeedHQ/action@v4
with:
mode: walltime
run: node --expose-gc --no-allocation-site-pretenuring ./benchmark/index.mjs --only-current
required-checks:
name: Required Checks
runs-on: ubuntu-latest
if: always()
needs:
- yarn-validate
- prepublish-windows
- publint
- lint
- test
- test-coverage
- test-windows-mac
- runtime-interop
- eslint-version-test
- external-parser-tests
- test262-finish
steps:
- name: Check whether the needed jobs succeeded
uses: re-actors/alls-green@b5b5b37504aa4183270bd3d855c52a67f212be35 # v1.3.0
with:
jobs: ${{ toJSON(needs) }}