Skip to content

Commit 257af5c

Browse files
Merge pull request #31 from OriginTrail/rs/swap-nyc-for-c8
ci: swap nyc with c8 for unit test coverage reports
2 parents 9f05093 + 2e6c2d8 commit 257af5c

File tree

4 files changed

+747
-2685
lines changed

4 files changed

+747
-2685
lines changed

.c8rc.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"all": true,
3+
"check-coverage": false,
4+
"lines": 80 ,
5+
"reporter": [
6+
"html",
7+
"text"
8+
],
9+
"include": [
10+
"src/**/*.js"
11+
]
12+
}

.github/workflows/checks.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,12 @@ on:
44
push:
55
branches: ["**"]
66
pull_request:
7+
workflow_dispatch:
78

89
jobs:
910
test:
1011
runs-on: ubuntu-latest
11-
12+
continue-on-error: false
1213
steps:
1314
- name: Checkout repository
1415
uses: actions/checkout@v3
@@ -21,5 +22,16 @@ jobs:
2122
- name: Install dependencies
2223
run: npm ci
2324

24-
- name: Run Tests
25+
- name: Run tests
2526
run: npm test
27+
28+
- name: Generate test coverage
29+
run: npm run test:coverage
30+
31+
- name: Upload artifact of unit tests
32+
if: '!cancelled()'
33+
uses: actions/upload-artifact@v4
34+
with:
35+
name: unit-test-coverage
36+
path: ./coverage/
37+
retention-days: 7

0 commit comments

Comments
 (0)