-
Notifications
You must be signed in to change notification settings - Fork 10
59 lines (52 loc) · 1.61 KB
/
coverage.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
name: Test Coverage
"on":
push:
branches: ["main"]
jobs:
tests:
name: "${{ matrix.subproject }} subproject test on Node.js v${{ matrix.node }}"
runs-on: ubuntu-latest
strategy:
matrix:
subproject:
- api
- inventory
- recommendations
- checkout
- spa
node:
- 18
steps:
- uses: actions/setup-node@v3
with:
node-version: "${{ matrix.node }}"
- name: Checkout
uses: actions/checkout@v3
- name: "Cache node_modules"
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ matrix.subproject }}-${{ runner.os }}-node-v${{ matrix.node }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ matrix.subproject }}-${{ runner.os }}-node-v${{ matrix.node }}-
- name: Install Dependencies
run: cd ${{ matrix.subproject }} && npm install
- name: Run All Node.js Test Coverage Tasks
run: cd ${{ matrix.subproject }} && npm run test:coverage
- name: Coveralls Parallel
uses: coverallsapp/github-action@master
with:
path-to-lcov: ./${{ matrix.subproject }}/coverage/lcov.info
base-path: ./${{ matrix.subproject }}
github-token: ${{ secrets.github_token }}
flag-name: run-${{ matrix.subproject }}
parallel: true
finish:
needs: tests
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.github_token }}
parallel-finished: true