Skip to content

Commit ca4c03e

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

File tree

1 file changed

+40
-3
lines changed

1 file changed

+40
-3
lines changed

.github/workflows/ci.yml

Lines changed: 40 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,46 @@ 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: Checkout repository
53+
uses: actions/checkout@v4
54+
55+
- name: Setup Node.js
56+
uses: actions/setup-node@v4
57+
with:
58+
node-version: ${{ matrix.node }}
59+
registry-url: https://registry.npmjs.org/
60+
cache: npm
61+
62+
- name: Install latest NPM
63+
run: npm i -g npm@latest
64+
65+
- name: Download build artifact
66+
uses: actions/download-artifact@v4
67+
with:
68+
name: package
69+
path: ./package
70+
71+
- name: Extract build package
72+
working-directory: ./package
73+
run: tar -xzf cldn-ip-0.0.0-dev.tgz
74+
75+
- name: Install test dependencies
76+
working-directory: ./package/package
77+
run: npm ci
78+
79+
- name: Test
80+
working-directory: ./package/package
81+
run: npm run test
82+
4683
publish:
4784
name: Publish
4885
needs: build

0 commit comments

Comments
 (0)