Skip to content

Commit 9758b2f

Browse files
Create test_with_cov.yml
1 parent 6ee44d9 commit 9758b2f

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
on:
2+
workflow_call:
3+
4+
jobs:
5+
test:
6+
runs-on: ubuntu-latest
7+
strategy:
8+
fail-fast: false
9+
matrix:
10+
node: [12.x, 14.x, 16.x, 18.x]
11+
steps:
12+
- name: Git checkout
13+
uses: actions/checkout@v2
14+
15+
- name: Use Node.js ${{ matrix.node }}
16+
uses: actions/setup-node@v1
17+
with:
18+
node-version: ${{ matrix.node }}
19+
20+
- name: Start Redis
21+
uses: supercharge/[email protected]
22+
with:
23+
redis-version: latest
24+
25+
- run: npm install
26+
- run: npm run lint
27+
- run: npm run build
28+
- run: npm run test:tsd
29+
- run: npm run test:cov || npm run test:cov || npm run test:cov
30+
- name: Coveralls
31+
if: matrix.node == '18.x'
32+
uses: coverallsapp/github-action@master
33+
with:
34+
github-token: ${{ secrets.GITHUB_TOKEN }}
35+
flag-name: node-${{matrix.node}}
36+
parallel: true
37+
38+
code-coverage:
39+
needs: test
40+
runs-on: ubuntu-latest
41+
steps:
42+
- name: Coveralls
43+
uses: coverallsapp/github-action@master
44+
with:
45+
github-token: ${{ secrets.GITHUB_TOKEN }}
46+
parallel-finished: true

0 commit comments

Comments
 (0)