Skip to content

Commit

Permalink
fix: update codecov
Browse files Browse the repository at this point in the history
  • Loading branch information
erezrokah committed Nov 10, 2020
1 parent 2a435d8 commit 6f25f9f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
14 changes: 12 additions & 2 deletions {{cookiecutter.project_slug}}/.github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,15 @@ jobs:
if: "${{ matrix.node-version == '14.x' }}"
- name: Tests
run: npm run test:ci
- name: Codecov test coverage
run: npm run test:report:coverage "${{ matrix.os }}" "${{ matrix.node-version }}"
- name: Get test coverage flags
id: test-coverage-flags
run: |-
os=${{ matrix.os }}
node=${{ matrix.node-version }}
echo "::set-output name=os::${os/-latest/}"
echo "::set-output name=node::node_${node//./}"
shell: bash
- uses: codecov/codecov-action@v1
with:
file: coverage/coverage-final.json
flags: ${{ steps.test-coverage-flags.outputs.os }},${{ steps.test-coverage-flags.outputs.node }}
5 changes: 2 additions & 3 deletions {{cookiecutter.project_slug}}/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@
"test:dev": "run-s test:dev:*",
"test:ci": "run-s test:ci:*",
"test:dev:ava": "ava",
"test:ci:ava": "nyc -r lcovonly -r text -r json ava",
"test:report:coverage": "report_coverage"
"test:ci:ava": "nyc -r lcovonly -r text -r json ava"
},
"scriptsArgs": {
"eslint": "--ignore-path .gitignore --cache --format=codeframe --max-warnings=0 \"{src,scripts,.github}/**/*.{js,md,html}\" \"*.{js,md,html}\" \".*.{js,md,html}\"",
Expand All @@ -46,7 +45,7 @@
},
"dependencies": {},
"devDependencies": {
"@netlify/eslint-config-node": "^0.6.1",
"@netlify/eslint-config-node": "^1.0.0",
"ava": "^2.4.0",
"nyc": "^15.0.0"
},
Expand Down

0 comments on commit 6f25f9f

Please sign in to comment.