Skip to content

Commit 3ea522a

Browse files
committed
add test coverage as comment in PR
1 parent fccc6cd commit 3ea522a

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

.github/workflows/ci.yaml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,18 @@ jobs:
4848
- name: Check GoReleaser
4949
uses: goreleaser/goreleaser-action@v6
5050
with:
51-
args: check
51+
args: check
52+
53+
code_coverage:
54+
name: "Code coverage report"
55+
if: github.event_name == 'pull_request' # Do not run when workflow is triggered by push to main branch
56+
runs-on: ubuntu-latest
57+
needs: main
58+
permissions:
59+
contents: read
60+
actions: read # to download code coverage results from "main" job
61+
pull-requests: write # write permission needed to comment on PR
62+
steps:
63+
- uses: fgrosse/[email protected]
64+
with:
65+
coverage-file-name: "coverage.out"

0 commit comments

Comments
 (0)