Skip to content

Commit 208e064

Browse files
committed
Enable CI
1 parent 6af27e6 commit 208e064

File tree

1 file changed

+57
-19
lines changed

1 file changed

+57
-19
lines changed

.github/workflows/ci.yml

Lines changed: 57 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -29,21 +29,13 @@ jobs:
2929
- windows-latest
3030
- macos-14
3131
node-version:
32-
- '22'
33-
- '20'
34-
- '18'
35-
- '16'
36-
- '14'
32+
- 23-nightly
3733
bundle:
3834
- 'true'
3935
include:
40-
- node-version: '*'
36+
- node-version: 23-nightly
4137
bundle: false
4238
os: ubuntu-latest
43-
exclude:
44-
# No Node 14 on ARM macOS
45-
- node-version: '14'
46-
os: macos-14
4739

4840
runs-on: ${{ matrix.os }}
4941
name: Test Node ${{ matrix.node-version }} on ${{ matrix.os }}${{ (!matrix.bundle && ' with --no-bundle') || '' }}
@@ -55,19 +47,29 @@ jobs:
5547
with:
5648
node-version: ${{ matrix.node-version }}
5749
check-latest: true
50+
51+
- run: |
52+
echo "value=--no-warnings=ExperimentalWarning --experimental-require-module" >> "$GITHUB_OUTPUT"
53+
name: Enable require(ESM)
54+
id: node-options
55+
5856
- run: npm ci
5957

6058
- name: Tests
6159
id: test
6260
# run tests, but lint separately
6361
run: npm run test -- --no-lint --bundle=${{ matrix.bundle }}
62+
env:
63+
NODE_OPTIONS: ${{ steps.node-options.outputs.value }}
6464

6565
- name: Print baseline diff on failure
6666
if: ${{ failure() && steps.test.conclusion == 'failure' }}
6767
run: |
6868
npx hereby baseline-accept
6969
git add tests/baselines/reference
7070
git diff --staged --exit-code
71+
env:
72+
NODE_OPTIONS: ${{ steps.node-options.outputs.value }}
7173

7274
lint:
7375
runs-on: ubuntu-latest
@@ -76,7 +78,7 @@ jobs:
7678
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
7779
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
7880
with:
79-
node-version: '*'
81+
node-version: '23-nightly'
8082
check-latest: true
8183
- run: npm ci
8284

@@ -104,7 +106,7 @@ jobs:
104106
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
105107
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
106108
with:
107-
node-version: '*'
109+
node-version: '23-nightly'
108110
check-latest: true
109111
- run: npm ci
110112

@@ -125,7 +127,7 @@ jobs:
125127
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
126128
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
127129
with:
128-
node-version: '*'
130+
node-version: '23-nightly'
129131
check-latest: true
130132
- run: npm ci
131133

@@ -142,7 +144,7 @@ jobs:
142144
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
143145
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
144146
with:
145-
node-version: '*'
147+
node-version: '23-nightly'
146148
check-latest: true
147149
- run: npm ci
148150

@@ -157,8 +159,14 @@ jobs:
157159

158160
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
159161
with:
160-
node-version: '*'
162+
node-version: '23-nightly'
161163
check-latest: true
164+
165+
- run: |
166+
echo "value=--no-warnings=ExperimentalWarning --experimental-require-module" >> "$GITHUB_OUTPUT"
167+
name: Enable require(ESM)
168+
id: node-options
169+
162170
- run: |
163171
npm --version
164172
# corepack enable npm
@@ -168,12 +176,16 @@ jobs:
168176
- run: npm ci
169177

170178
- run: npx hereby lkg
179+
env:
180+
NODE_OPTIONS: ${{ steps.node-options.outputs.value }}
171181
- run: |
172182
node ./scripts/addPackageJsonGitHead.mjs package.json
173183
npm pack
174184
mv typescript*.tgz typescript.tgz
175185
echo "package=$PWD/typescript.tgz" >> "$GITHUB_OUTPUT"
176186
id: pack
187+
env:
188+
NODE_OPTIONS: ${{ steps.node-options.outputs.value }}
177189
178190
- name: Smoke test
179191
run: |
@@ -189,6 +201,8 @@ jobs:
189201
190202
node $GITHUB_WORKSPACE/scripts/checkModuleFormat.mjs typescript
191203
node $GITHUB_WORKSPACE/scripts/checkModuleFormat.mjs typescript/lib/tsserverlibrary
204+
env:
205+
NODE_OPTIONS: ${{ steps.node-options.outputs.value }}
192206

193207
package-size:
194208
runs-on: ubuntu-latest
@@ -206,7 +220,7 @@ jobs:
206220

207221
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
208222
with:
209-
node-version: '*'
223+
node-version: '23-nightly'
210224
check-latest: true
211225
- run: |
212226
npm --version
@@ -240,7 +254,7 @@ jobs:
240254
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
241255
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
242256
with:
243-
node-version: '*'
257+
node-version: 23-nightly
244258
check-latest: true
245259
- run: npm ci
246260

@@ -257,18 +271,30 @@ jobs:
257271
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
258272
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
259273
with:
260-
node-version: '*'
274+
node-version: 23-nightly
261275
check-latest: true
276+
277+
- run: |
278+
echo "value=--no-warnings=ExperimentalWarning --experimental-require-module" >> "$GITHUB_OUTPUT"
279+
name: Enable require(ESM)
280+
id: node-options
281+
262282
- run: npm ci
263283

264284
- name: Build tsc
265285
run: npx hereby tsc
286+
env:
287+
NODE_OPTIONS: ${{ steps.node-options.outputs.value }}
266288

267289
- name: Clean
268290
run: npx hereby clean-src
291+
env:
292+
NODE_OPTIONS: ${{ steps.node-options.outputs.value }}
269293

270294
- name: Self build
271295
run: npx hereby build-src --built
296+
env:
297+
NODE_OPTIONS: ${{ steps.node-options.outputs.value }}
272298

273299
baselines:
274300
runs-on: ubuntu-latest
@@ -277,20 +303,30 @@ jobs:
277303
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
278304
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
279305
with:
280-
node-version: '*'
306+
node-version: 23-nightly
281307
check-latest: true
308+
309+
- run: |
310+
echo "value=--no-warnings=ExperimentalWarning --experimental-require-module" >> "$GITHUB_OUTPUT"
311+
name: Enable require(ESM)
312+
id: node-options
313+
282314
- run: npm ci
283315

284316
- name: Remove all baselines
285317
run: rm -rf tests/baselines/reference
286318

287319
- name: Run tests
288320
run: npm test &> /dev/null || exit 0
321+
env:
322+
NODE_OPTIONS: ${{ steps.node-options.outputs.value }}
289323

290324
- name: Accept baselines
291325
run: |
292326
npx hereby baseline-accept
293327
git add tests/baselines/reference
328+
env:
329+
NODE_OPTIONS: ${{ steps.node-options.outputs.value }}
294330

295331
- name: Check baselines
296332
id: check-baselines
@@ -309,6 +345,8 @@ jobs:
309345
git diff --staged > fix_baselines.patch
310346
exit 1
311347
fi
348+
env:
349+
NODE_OPTIONS: ${{ steps.node-options.outputs.value }}
312350

313351
- name: Upload baseline diff artifact
314352
if: ${{ failure() && steps.check-baselines.conclusion == 'failure' }}

0 commit comments

Comments
 (0)