Skip to content

Commit d7311bc

Browse files
committed
feat: setup github action
Signed-off-by: seven <zilisheng1996@gmail.com>
1 parent 1de502e commit d7311bc

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

.github/workflows/node.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Node.js CI
2+
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
branches: [master]
8+
9+
jobs:
10+
build:
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
os: [ubuntu-latest]
15+
node-version: [20.x]
16+
17+
runs-on: ${{ matrix.os }}
18+
timeout-minutes: 20
19+
20+
steps:
21+
- name: Github checkout
22+
uses: actions/checkout@v4
23+
if: matrix.os == 'ubuntu-latest'
24+
- name: Use Node.js ${{ matrix.node-version }}
25+
uses: actions/setup-node@v4
26+
with:
27+
node-version: ${{ matrix.node-version }}
28+
cache: 'npm'
29+
- run: npm ci
30+
- run: npm run lint:check
31+
- run: npm audit --audit-level=critical
32+
- run: npm run test:ci
33+
- name: Upload coverage reports to Codecov
34+
uses: codecov/codecov-action@v4
35+
with:
36+
token: ${{ secrets.CODECOV_TOKEN }}
37+
verbose: true
38+
fail_ci_if_error: true
39+
40+
- run: npm run build

0 commit comments

Comments
 (0)