Skip to content

Commit 475494b

Browse files
committed
Improve test coverage
1 parent a6b3d14 commit 475494b

File tree

3 files changed

+11
-48
lines changed

3 files changed

+11
-48
lines changed

.github/workflows/workflow.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,13 @@ jobs:
2929
if: "${{ matrix.node-version == '14.x' }}"
3030
- name: Tests
3131
run: npm run test:ci
32-
- name: Codecov test coverage
33-
run: node ./bin/report_coverage.js "${{ matrix.os }}" "${{ matrix.node-version }}"
32+
- name: Get test coverage OS flag
33+
id: test-coverage-os
34+
run: echo "::set-output name=flag::$(bash -c 'flag=${{ matrix.os }} && echo ${flag/-latest/}')"
35+
- name: Get test coverage Node.js version flag
36+
id: test-coverage-node
37+
run: echo "::set-output name=flag::$(bash -c 'flag=${{ matrix.node-version }} && echo node_${flag//./}')"
38+
- uses: codecov/codecov-action@v1
39+
with:
40+
file: coverage/coverage-final.json
41+
flags: ${{ steps.test-coverage-os.outputs.flag }},${{ steps.test-coverage-node.outputs.flag }}

bin/report_coverage.js

Lines changed: 0 additions & 44 deletions
This file was deleted.

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@
1010
"bin"
1111
],
1212
"bin": {
13-
"run-e": "./bin/run_e.js",
14-
"report-coverage": "./bin/report_coverage.js"
13+
"run-e": "./bin/run_e.js"
1514
},
1615
"scripts": {
1716
"test": "run-s format test:dev",

0 commit comments

Comments
 (0)