-
Notifications
You must be signed in to change notification settings - Fork 178
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add coverage report to PRs (#1496)
- Loading branch information
1 parent
1fabeeb
commit 86ac961
Showing
3 changed files
with
22 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,6 +34,26 @@ jobs: | |
go-version-file: 'go.mod' | ||
- name: Unit Test | ||
run: make test | ||
- name: Convert coverage report to Cobertura format | ||
run: | | ||
go install github.com/axw/gocov/gocov@latest | ||
go install github.com/AlekSi/gocov-xml@latest | ||
gocov convert coverage.out | gocov-xml > coverage.xml | ||
- name: Code Coverage Summary Report | ||
uses: irongut/[email protected] | ||
with: | ||
filename: coverage.xml | ||
format: markdown | ||
hide_complexity: true | ||
hide_branch_rate: false | ||
output: both | ||
badge: true | ||
- name: Add Coverage PR Comment | ||
uses: marocchino/sticky-pull-request-comment@v2 | ||
if: github.event_name == 'pull_request' | ||
with: | ||
recreate: true | ||
path: code-coverage-results.md | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,6 +31,7 @@ service-account.json | |
log.* | ||
test.env | ||
__debug_* | ||
coverage.out | ||
|
||
website/vendor | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters