-
Notifications
You must be signed in to change notification settings - Fork 129
62 lines (62 loc) · 1.75 KB
/
run-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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: Run tests
on: [push, pull_request]
jobs:
unit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 16
cache: "npm"
cache-dependency-path: "**/package-lock.json"
- name: install-root
run: npm install
- name: install-unit
working-directory: ./test/unit
run: npm install
- name: run unit test
working-directory: ./test/unit
run: npm run coverage
- name: send coverage
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
flag-name: unit
base-path: ./test/unit
path-to-lcov: ./test/unit/coverage/lcov.info
parallel: true
cfc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 16
cache: "npm"
cache-dependency-path: "**/package-lock.json"
- name: install-root
run: npm install
- name: install-cfc
working-directory: ./test/cfc
run: npm install
- name: run cfc test
working-directory: ./test/cfc
run: npm run coverage
- name: send coverage
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
flag-name: cfc
base-path: ./test/cfc
path-to-lcov: ./test/cfc/coverage/lcov.info
parallel: true
teardown:
needs: [unit, cfc]
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true