Skip to content

Commit 6b8064b

Browse files
committed
Update node.js and action versions.
1 parent bfeb0d9 commit 6b8064b

1 file changed

Lines changed: 80 additions & 0 deletions

File tree

.github/workflows/main.yaml

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
name: Node.js CI
2+
3+
on: [push]
4+
5+
jobs:
6+
lint:
7+
runs-on: ubuntu-latest
8+
timeout-minutes: 10
9+
strategy:
10+
matrix:
11+
node-version: [24.x]
12+
steps:
13+
- uses: actions/checkout@v6
14+
- name: Use Node.js ${{ matrix.node-version }}
15+
uses: actions/setup-node@v6
16+
with:
17+
node-version: ${{ matrix.node-version }}
18+
- run: npm install
19+
- name: Run eslint
20+
run: npm run lint
21+
test-node:
22+
runs-on: ubuntu-latest
23+
needs: [lint]
24+
timeout-minutes: 10
25+
strategy:
26+
matrix:
27+
node-version: [18.x, 20.x, 22.x, 24.x]
28+
steps:
29+
- uses: actions/checkout@v6
30+
- name: Install with Node.js 24.x
31+
uses: actions/setup-node@v6
32+
with:
33+
node-version: 24.x
34+
- run: npm install
35+
- name: Use Node.js ${{ matrix.node-version }}
36+
uses: actions/setup-node@v6
37+
with:
38+
node-version: ${{ matrix.node-version }}
39+
- name: Run ESM test with Node.js ${{ matrix.node-version }}
40+
run: npm run test-node
41+
- name: Run CJS test with Node.js ${{ matrix.node-version }}
42+
run: npm run test-node-cjs
43+
test-karma:
44+
runs-on: ubuntu-latest
45+
needs: [lint, test-node]
46+
timeout-minutes: 10
47+
strategy:
48+
matrix:
49+
node-version: [24.x]
50+
steps:
51+
- uses: actions/checkout@v6
52+
- name: Use Node.js ${{ matrix.node-version }}
53+
uses: actions/setup-node@v6
54+
with:
55+
node-version: ${{ matrix.node-version }}
56+
- run: npm install
57+
- name: Run karma tests
58+
run: npm run test-karma
59+
coverage:
60+
needs: [test-node, test-karma]
61+
runs-on: ubuntu-latest
62+
timeout-minutes: 10
63+
strategy:
64+
matrix:
65+
node-version: [24.x]
66+
steps:
67+
- uses: actions/checkout@v6
68+
- name: Use Node.js ${{ matrix.node-version }}
69+
uses: actions/setup-node@v6
70+
with:
71+
node-version: ${{ matrix.node-version }}
72+
- run: npm install
73+
- name: Generate coverage report
74+
run: npm run coverage-ci
75+
- name: Upload coverage to Codecov
76+
uses: codecov/codecov-action@v5
77+
with:
78+
files: ./coverage/lcov.info
79+
fail_ci_if_error: true
80+
token: ${{ secrets.CODECOV_TOKEN }}

0 commit comments

Comments
 (0)