Skip to content

Commit 8418561

Browse files
committed
ci: Add test matrix (Node 20, 22, 24 on Linux / macOS / Windows)
Also update checkout action to latest version.
1 parent 6cb0257 commit 8418561

File tree

4 files changed

+39
-2
lines changed

4 files changed

+39
-2
lines changed

.github/workflows/reuse-compliance.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ jobs:
1616
name: Compliance Check
1717
runs-on: ubuntu-latest
1818
steps:
19-
- uses: actions/checkout@v4
19+
- uses: actions/checkout@v5
2020
- name: Execute REUSE Compliance Check
2121
uses: fsfe/reuse-action@v6

.github/workflows/security-audit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818

1919
steps:
2020
- name: Checkout '${{ matrix.branch }}' branch
21-
uses: actions/checkout@v4
21+
uses: actions/checkout@v5
2222
with:
2323
ref: ${{ matrix.branch }}
2424

.github/workflows/test.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
permissions:
12+
contents: read
13+
14+
jobs:
15+
test:
16+
name: Unit and Integration
17+
strategy:
18+
fail-fast: false # Do not stop other jobs if one fails
19+
matrix:
20+
version: [20, 22, 24]
21+
os: [ubuntu-24.04, windows-2025, macos-15]
22+
runs-on: ${{ matrix.os }}
23+
steps:
24+
25+
- uses: actions/checkout@v5
26+
27+
- name: Setup Node.js
28+
uses: actions/setup-node@v6
29+
with:
30+
node-version: ${{ matrix.version }}
31+
32+
- name: Install dependencies
33+
run: npm ci
34+
35+
- name: Run unit tests
36+
run: npm run unit

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
"scripts": {
2626
"test": "npm run lint && npm run check-licenses && npm run depcheck && npm run coverage && npm run jsdoc-generate && npm run schema-generate && npm run generate-cli-doc",
2727
"lint": "eslint ./ && npm run lint --workspaces",
28+
"unit": "npm run unit --workspaces",
2829
"coverage": "npm run coverage --workspaces",
2930
"jsdoc": "npm run jsdoc-generate && open-cli site/api/index.html",
3031
"jsdoc-generate": "node ./scripts/isWorkspace.js && npm run jsdoc-generate-workspace || npm run jsdoc-generate-local",

0 commit comments

Comments
 (0)