Skip to content

Commit

Permalink
feat: add workflow step to publish test coverage report
Browse files Browse the repository at this point in the history
  • Loading branch information
sirishgf committed Jan 2, 2024
1 parent 7ac54cd commit d7cc311
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions .github/workflows/node-ci-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,17 @@ jobs:
- name: Lint with ESLint
run: DEBUG=eslint:cli-engine npx eslint .

- name: Test with ava
- name: Test with 'ava' and 'nyc'
id: unit-tests-step
run: find ./* -maxdepth 2 -name ava.config.js -print0 | xargs --null -I {} npx nyc ava --tap | npx tap-junit > test.xml

- name: Upload test artifact
id: upload-test-artifact
uses: actions/upload-artifact@v4
with:
name: my-artifact
path: coverage/lcov-report
retention-days: 14
# - name: Upload test artifact
# id: upload-test-artifact
# uses: actions/upload-artifact@v4
# with:
# name: my-artifact
# path: coverage/lcov-report
# retention-days: 14

- name: Publish test report
uses: mikepenz/action-junit-report@v4
Expand All @@ -49,4 +49,9 @@ jobs:
check_name: 'Test report'
require_passed_tests: true
detailed_summary: true
include_passed: true
include_passed: true

- name: Publish test coverage report
uses: sidx1024/[email protected]
with:
coverage_file: "coverage/coverage-summary.json"

0 comments on commit d7cc311

Please sign in to comment.