Skip to content

Commit 9a541bc

Browse files
committed
Separate tests step with matrix Node.js v20–v24
1 parent 9a61eb5 commit 9a541bc

File tree

1 file changed

+37
-3
lines changed

1 file changed

+37
-3
lines changed

.github/workflows/ci.yml

Lines changed: 37 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,6 @@ jobs:
3232
- name: Build
3333
run: npm run build
3434

35-
- name: Test
36-
run: npm run test
37-
3835
- name: Pack
3936
run: npm pack
4037

@@ -43,6 +40,43 @@ jobs:
4340
with:
4441
name: package
4542
path: cldn-ip-0.0.0-dev.tgz
43+
44+
test:
45+
name: Test on Node.js ${{ matrix.node }}
46+
runs-on: ubuntu-latest
47+
needs: build
48+
strategy:
49+
matrix:
50+
node: [20, 22, 24]
51+
steps:
52+
- name: Setup Node.js
53+
uses: actions/setup-node@v4
54+
with:
55+
node-version: ${{ matrix.node }}
56+
registry-url: https://registry.npmjs.org/
57+
cache: npm
58+
59+
- name: Install latest NPM
60+
run: npm i -g npm@latest
61+
62+
- name: Download build artifact
63+
uses: actions/download-artifact@v4
64+
with:
65+
name: package
66+
path: ./package
67+
68+
- name: Extract build package
69+
working-directory: ./package
70+
run: tar -xzf cldn-ip-0.0.0-dev.tgz
71+
72+
- name: Install test dependencies
73+
working-directory: ./package/package
74+
run: npm ci
75+
76+
- name: Test
77+
working-directory: ./package/package
78+
run: npm run test
79+
4680
publish:
4781
name: Publish
4882
needs: build

0 commit comments

Comments
 (0)