-
-
Notifications
You must be signed in to change notification settings - Fork 98
49 lines (46 loc) · 1.19 KB
/
node.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
41
42
43
44
45
46
47
48
49
name: Node.JS test and lint
on:
pull_request:
push:
branches:
- master
- dev
workflow_dispatch:
jobs:
nodejs-test:
runs-on: ubuntu-latest
strategy:
matrix:
# Remember to update README.md and package.json when updating the version matrix
version: [16, 18, 20, 22]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.version }}
cache: "npm"
- name: Install dependencies
run: npm ci
- name: Lint
run: npm run lint
- name: Build
run: npm run build
- name: Unit tests
run: npm run test
- name: Coveralls
if: ${{ success() }}
uses: coverallsapp/github-action@master
with:
parallel: true
flag-name: node-${{ matrix.version }}
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: "./coverage/lcov.info"
finish:
needs: nodejs-test
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.github_token }}
parallel-finished: true