Skip to content

Commit 97a45ce

Browse files
authored
Improved the CI (#54)
2 parents 1d70d8c + 543056e commit 97a45ce

File tree

2 files changed

+40
-9
lines changed

2 files changed

+40
-9
lines changed

.github/dependabot.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,10 @@ updates:
66
interval: weekly
77
day: monday
88
time: "06:00"
9-
reviewers:
10-
- cloudnode-pro/development
119

1210
- package-ecosystem: github-actions
1311
directory: /
1412
schedule:
1513
interval: weekly
1614
day: monday
1715
time: "06:00"
18-
reviewers:
19-
- cloudnode-pro/development

.github/workflows/ci.yml

Lines changed: 40 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
- name: Setup Node.js
2020
uses: actions/setup-node@v4
2121
with:
22-
node-version: 20
22+
node-version: 22
2323
registry-url: https://registry.npmjs.org/
2424
cache: npm
2525

@@ -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,44 @@ 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+
fail-fast: false
50+
matrix:
51+
node: [20, 22, 24]
52+
steps:
53+
- name: Checkout repository
54+
uses: actions/checkout@v4
55+
56+
- name: Setup Node.js
57+
uses: actions/setup-node@v4
58+
with:
59+
node-version: ${{ matrix.node }}
60+
registry-url: https://registry.npmjs.org/
61+
cache: npm
62+
63+
- name: Install latest NPM
64+
run: npm i -g npm@latest
65+
66+
- name: Install test dependencies
67+
run: npm ci
68+
69+
- name: Download build artifact
70+
uses: actions/download-artifact@v4
71+
with:
72+
name: package
73+
path: .
74+
75+
- name: Extract build package
76+
run: tar -xzf cldn-ip-0.0.0-dev.tgz --strip-components=1 -C . --overwrite
77+
78+
- name: Test
79+
run: npm run test
80+
4681
publish:
4782
name: Publish
4883
needs: build
@@ -59,7 +94,7 @@ jobs:
5994
- name: Setup Node.js
6095
uses: actions/setup-node@v4
6196
with:
62-
node-version: 20
97+
node-version: 22
6398
registry-url: https://registry.npmjs.org/
6499
cache: npm
65100

0 commit comments

Comments
 (0)