Skip to content

Commit

Permalink
Publish coverage results on PR and job
Browse files Browse the repository at this point in the history
  • Loading branch information
dickwolff authored Dec 29, 2023
1 parent 5e95a03 commit 83b68f4
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,29 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: actions/setup-node@v3
with:
node-version: '20'

- run: npm install

- run: npm run test
- uses: irongut/[email protected]

- name: Convert code coverage results
uses: irongut/[email protected]
with:
filename: coverage/*.xml
badge: true
format: 'markdown'
output: 'both'

- name: Add code coverage PR comment
uses: marocchino/sticky-pull-request-comment@v2
if: github.event_name == 'pull_request'
with:
recreate: true
path: coverage/results.md

- name: Write to job summary
run: cat coverage/results.md >> $GITHUB_STEP_SUMMARY

0 comments on commit 83b68f4

Please sign in to comment.