@@ -12,17 +12,17 @@ jobs:
1212 timeout-minutes : 10
1313 steps :
1414 - uses : actions/checkout@v3
15- - name : Use Node.js 18 .x
15+ - name : Use Node.js 22 .x
1616 uses : actions/setup-node@v3
1717 with :
18- node-version : 18 .x
19- cache : ' yarn '
18+ node-version : 22 .x
19+ cache : ' npm '
2020 - name : Install dependencies
21- run : yarn --frozen-lockfile
21+ run : npm ci
2222 - name : Setup and run tsc
23- run : yarn setup
23+ run : npm run setup
2424 - name : Esbuild
25- run : yarn esbuild
25+ run : npm run esbuild
2626 - name : Zip artifacts
2727 run : |
2828 zip -r compressed-build \
@@ -77,37 +77,35 @@ jobs:
7777 timeout-minutes : 10
7878 steps :
7979 - uses : actions/checkout@v3
80- - name : Use Node.js 18 .x
80+ - name : Use Node.js 22 .x
8181 uses : actions/setup-node@v3
8282 with :
83- node-version : 18 .x
84- cache : ' yarn '
83+ node-version : 22 .x
84+ cache : ' npm '
8585 - name : Install dependencies
8686 run : |
87- yarn --frozen-lockfile
88- yarn install-addons
87+ npm ci
8988 - name : Lint code
9089 env :
9190 NODE_OPTIONS : --max_old_space_size=4096
92- run : yarn lint
91+ run : npm run lint
9392 - name : Lint API
94- run : yarn lint-api
93+ run : npm run lint-api
9594
9695 test-unit-coverage :
9796 needs : build
9897 runs-on : ubuntu-latest
9998 timeout-minutes : 10
10099 steps :
101100 - uses : actions/checkout@v3
102- - name : Use Node.js 18 .x
101+ - name : Use Node.js 22 .x
103102 uses : actions/setup-node@v3
104103 with :
105- node-version : 18 .x
106- cache : ' yarn '
104+ node-version : 22 .x
105+ cache : ' npm '
107106 - name : Install dependencies
108107 run : |
109- yarn --frozen-lockfile
110- yarn install-addons
108+ npm ci
111109 - uses : actions/download-artifact@v4
112110 with :
113111 name : build-artifacts
@@ -122,7 +120,7 @@ jobs:
122120 ls -R
123121 - name : Unit test coverage
124122 run : |
125- yarn test-unit-coverage --forbid-only
123+ npm run test-unit-coverage --forbid-only
126124 EXIT_CODE=$?
127125 ./node_modules/.bin/nyc report --reporter=cobertura
128126 exit $EXIT_CODE
@@ -131,7 +129,7 @@ jobs:
131129 timeout-minutes : 20
132130 strategy :
133131 matrix :
134- node-version : [18 ]
132+ node-version : [22 ]
135133 runs-on : [ubuntu, macos, windows]
136134 runs-on : ${{ matrix.runs-on }}-latest
137135 steps :
@@ -140,11 +138,10 @@ jobs:
140138 uses : actions/setup-node@v3
141139 with :
142140 node-version : ${{ matrix.node-version }}.x
143- cache : ' yarn '
141+ cache : ' npm '
144142 - name : Install dependencies
145143 run : |
146- yarn --frozen-lockfile
147- yarn install-addons
144+ npm ci
148145 - name : Wait for build job
149146 uses :
NathanFirmo/[email protected] 150147 with :
@@ -163,13 +160,13 @@ jobs:
163160 fi
164161 ls -R
165162 - name : Unit tests
166- run : yarn test-unit --forbid-only
163+ run : npm run test-unit --forbid-only
167164
168165 test-integration :
169166 timeout-minutes : 20
170167 strategy :
171168 matrix :
172- node-version : [18 ] # just one as integration tests are about testing in browser
169+ node-version : [22 ] # just one as integration tests are about testing in browser
173170 runs-on : [ubuntu-22.04] # macos is flaky
174171 browser : [chromium, firefox, webkit]
175172 runs-on : ${{ matrix.runs-on }}
@@ -179,11 +176,10 @@ jobs:
179176 uses : actions/setup-node@v3
180177 with :
181178 node-version : ${{ matrix.node-version }}.x
182- cache : ' yarn '
179+ cache : ' npm '
183180 - name : Install dependencies
184181 run : |
185- yarn --frozen-lockfile
186- yarn install-addons
182+ npm ci
187183 - name : Install playwright
188184 run : npx playwright install --with-deps ${{ matrix.browser }}
189185 - name : Wait for build job
@@ -204,49 +200,48 @@ jobs:
204200 fi
205201 ls -R
206202 - name : Build demo
207- run : yarn esbuild-demo
203+ run : npm run esbuild-demo
208204 - name : Integration tests (core) # Tests use 50% workers to reduce flakiness
209- run : yarn test-integration-${{ matrix.browser }} --workers=50% --forbid-only --suite=core
205+ run : npm run test-integration-${{ matrix.browser }} --workers=50% --forbid-only --suite=core
210206 - name : Integration tests (addon-attach)
211- run : yarn test-integration-${{ matrix.browser }} --workers=50% --forbid-only --suite=addon-attach
207+ run : npm run test-integration-${{ matrix.browser }} --workers=50% --forbid-only --suite=addon-attach
212208 - name : Integration tests (addon-clipboard)
213- run : yarn test-integration-${{ matrix.browser }} --workers=50% --forbid-only --suite=addon-clipboard
209+ run : npm run test-integration-${{ matrix.browser }} --workers=50% --forbid-only --suite=addon-clipboard
214210 - name : Integration tests (addon-fit)
215- run : yarn test-integration-${{ matrix.browser }} --workers=50% --forbid-only --suite=addon-fit
211+ run : npm run test-integration-${{ matrix.browser }} --workers=50% --forbid-only --suite=addon-fit
216212 - name : Integration tests (addon-image)
217- run : yarn test-integration-${{ matrix.browser }} --workers=50% --forbid-only --suite=addon-image
213+ run : npm run test-integration-${{ matrix.browser }} --workers=50% --forbid-only --suite=addon-image
218214 - name : Integration tests (addon-progress)
219- run : yarn test-integration-${{ matrix.browser }} --workers=50% --forbid-only --suite=addon-progress
215+ run : npm run test-integration-${{ matrix.browser }} --workers=50% --forbid-only --suite=addon-progress
220216 - name : Integration tests (addon-search)
221- run : yarn test-integration-${{ matrix.browser }} --workers=50% --forbid-only --suite=addon-search
217+ run : npm run test-integration-${{ matrix.browser }} --workers=50% --forbid-only --suite=addon-search
222218 - name : Integration tests (addon-serialize)
223- run : yarn test-integration-${{ matrix.browser }} --workers=50% --forbid-only --suite=addon-serialize
219+ run : npm run test-integration-${{ matrix.browser }} --workers=50% --forbid-only --suite=addon-serialize
224220 - name : Integration tests (addon-unicode-graphemes)
225- run : yarn test-integration-${{ matrix.browser }} --workers=50% --forbid-only --suite=addon-unicode-graphemes
221+ run : npm run test-integration-${{ matrix.browser }} --workers=50% --forbid-only --suite=addon-unicode-graphemes
226222 - name : Integration tests (addon-unicode11)
227- run : yarn test-integration-${{ matrix.browser }} --workers=50% --forbid-only --suite=addon-unicode11
223+ run : npm run test-integration-${{ matrix.browser }} --workers=50% --forbid-only --suite=addon-unicode11
228224 - name : Integration tests (addon-web-links)
229- run : yarn test-integration-${{ matrix.browser }} --workers=50% --forbid-only --suite=addon-web-links
225+ run : npm run test-integration-${{ matrix.browser }} --workers=50% --forbid-only --suite=addon-web-links
230226 - name : Integration tests (addon-webgl)
231- run : yarn test-integration-${{ matrix.browser }} --workers=50% --forbid-only --suite=addon-webgl
227+ run : npm run test-integration-${{ matrix.browser }} --workers=50% --forbid-only --suite=addon-webgl
232228
233229 release-dry-run :
234230 needs : build
235231 runs-on : ubuntu-latest
236232 strategy :
237233 matrix :
238- node-version : [18 ]
234+ node-version : [22 ]
239235 steps :
240236 - uses : actions/checkout@v3
241237 - name : Use Node.js ${{ matrix.node-version }}.x
242238 uses : actions/setup-node@v3
243239 with :
244240 node-version : ${{ matrix.node-version }}.x
245- cache : ' yarn '
241+ cache : ' npm '
246242 - name : Install dependencies
247243 run : |
248- yarn --frozen-lockfile
249- yarn install-addons
244+ npm ci
250245 - name : Install playwright
251246 run : npx playwright install
252247 - uses : actions/download-artifact@v4
@@ -263,7 +258,7 @@ jobs:
263258 ls -R
264259 - name : Package headless
265260 run : |
266- yarn package-headless
261+ npm run package-headless
267262 node ./bin/package_headless.js
268263 - name : Publish to npm (dry run)
269264 run : node ./bin/publish.js --dry
0 commit comments