-
Notifications
You must be signed in to change notification settings - Fork 4
76 lines (63 loc) · 1.46 KB
/
ci_pr.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: CI PR
on:
pull_request:
types:
- opened
- synchronize
paths:
- 'package.json'
- 'package-lock.lock'
- 'src/**/*.ts'
- 'test/**/*.js'
- 'tsconfig.json'
jobs:
test:
name: Testing with Node ${{ matrix.node }}
runs-on: ubuntu-latest
strategy:
matrix:
node:
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
steps:
- name: Check out repository code
uses: actions/checkout@v2
- name: Setting up node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- name: Install dependencies
run: npm install
- name: Build the code
run: npm run build
- name: Run lint
run: npm run lint
- name: Run test
run: npm run test
- name: Run coverage
run: |
npm run coverage
npm run coverage:report
- name: Run coveralls
uses: coverallsapp/github-action@v1.1.0
with:
parallel: true
flag-name: node-version ${{ matrix.node }}
github-token: ${{ secrets.GITHUB_TOKEN }}
report-coverage:
name: Report coverage to Coveralls
needs: test
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true