Skip to content

Commit

Permalink
First attempt to use go-coverage-report
Browse files Browse the repository at this point in the history
  • Loading branch information
fgrosse committed Mar 11, 2024
1 parent fda9c51 commit 28820ef
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ jobs:
GH_REPO: ${{ github.repository }}
GH_TOKEN: ${{ github.token }}
steps:
- name: Install go-coverage-report
run: go install github.com/fgrosse/[email protected]

- name: Determine changed files
id: changed-files
uses: tj-actions/changed-files@v42
Expand Down Expand Up @@ -64,7 +67,13 @@ jobs:
path: new-coverage.txt

- name: Compare code coverage results
run: 'echo "## Coverage report" > coverage-comment.md'
run: |
go-coverage-report \
-prefix=github.com/fgrosse/prioqueue \
old-coverage.txt \
new-coverage.txt \
.github/outputs/all_changed_files.json \
> coverage-comment.md
- name: Comment on pull request
run: gh pr comment ${{ github.event.number }} --body-file=coverage-comment.md

0 comments on commit 28820ef

Please sign in to comment.