Skip to content

Commit

Permalink
tests: replace nyc with c8
Browse files Browse the repository at this point in the history
  • Loading branch information
screendriver committed Oct 7, 2020
1 parent 10b2679 commit 52c005c
Show file tree
Hide file tree
Showing 5 changed files with 229 additions and 815 deletions.
15 changes: 15 additions & 0 deletions .c8rc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"all": true,
"lines": 100,
"functions": 100,
"statements": 100,
"branches": 100,
"instrument": true,
"extension": [".ts"],
"include": ["src/**/*"],
"exclude": ["src/index.ts"],
"reporter": ["lcov", "text-summary", "json"],
"check-coverage": true,
"reportDir": "./target/coverage",
"tempDirectory": "./target/c8_output"
}
21 changes: 15 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,20 @@ name: CI
on: [push, pull_request]

jobs:
code-coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js v14
uses: actions/setup-node@v1
with:
node-version: 14
- run: npm ci
- run: npm run test:unit:coverage
- name: Upload code coverage to Codecov
uses: codecov/codecov-action@v1
with:
file: target/coverage/coverage-final.json
build:
runs-on: ubuntu-latest
strategy:
Expand Down Expand Up @@ -31,10 +45,5 @@ jobs:
run: npm run compile
- name: Run tests
run: |
npm run test:unit:coverage
npm run test:unit
npm run test:integration
- name: Upload code coverage to Codecov
uses: codecov/codecov-action@v1
with:
token: ${{secrets.CODECOV_TOKEN}}
file: target/coverage/clover.xml
19 changes: 0 additions & 19 deletions .nycrc

This file was deleted.

Loading

0 comments on commit 52c005c

Please sign in to comment.