Skip to content

Commit

Permalink
chore: make coverage report for codecov more precise
Browse files Browse the repository at this point in the history
Switch from lcov to cobertura to allow handling branch coverage on PR reports
  • Loading branch information
tux-tn committed Apr 26, 2021
1 parent c35559f commit f8f95e3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,8 @@ jobs:
run: npm install
- name: Run tests
run: npm test
- if: matrix.node-version == 14
name: Generate coverage file
run: npm run test:ci > coverage.lcov
- if: matrix.node-version == 14
name: Send coverage info to Codecov
uses: codecov/codecov-action@v1
with:
file: ./coverage.lcov
file: ./coverage/cobertura-coverage.xml
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,7 @@
"build:node": "babel src -d .",
"build": "npm run build:browser && npm run build:node && npm run build:es",
"pretest": "npm run build && npm run lint",
"test": "nyc mocha --require @babel/register --reporter dot",
"test:ci": "nyc report --reporter=text-lcov"
"test": "nyc --reporter=cobertura --reporter=text-summary mocha --require @babel/register --reporter dot"
},
"engines": {
"node": ">= 0.10"
Expand Down

0 comments on commit f8f95e3

Please sign in to comment.