-
Notifications
You must be signed in to change notification settings - Fork 1
40 lines (37 loc) · 927 Bytes
/
npm-test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: Tests
on:
pull_request:
types: [opened, edited, synchronize]
push:
branches:
- master
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node: ["16", "18", "20"]
name: Test with node v${{ matrix.node }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- run: npm ci
- run: npm run lint
- run: npm test
- run: npm run build
- uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.github_token }}
flag-name: node v${{ matrix.node }}
parallel: true
finish:
needs: test
runs-on: ubuntu-latest
name: Publishing coverage report
steps:
- uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.github_token }}
parallel-finished: true