Skip to content

Commit c039e3c

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

File tree

1 file changed

+36
-3
lines changed

1 file changed

+36
-3
lines changed

.github/workflows/ci.yml

Lines changed: 36 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,42 @@ 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+
cache: npm
57+
58+
- name: Install latest NPM
59+
run: npm i -g npm@latest
60+
61+
- name: Download build artifact
62+
uses: actions/download-artifact@v4
63+
with:
64+
name: package
65+
path: ./package
66+
67+
- name: Extract build package
68+
working-directory: ./package
69+
run: tar -xzf cldn-ip-0.0.0-dev.tgz
70+
71+
- name: Install test dependencies
72+
working-directory: ./package/package
73+
run: npm ci
74+
75+
- name: Test
76+
working-directory: ./package/package
77+
run: npm run test
78+
4679
publish:
4780
name: Publish
4881
needs: build

0 commit comments

Comments
 (0)