-
Notifications
You must be signed in to change notification settings - Fork 706
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CI: store merged coverage as artifact #1613
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, please undo all the style changes and limit your PR to only adding the extra build step.
Sorry, I think it's because of my editor. Made changes as requested. |
@saiaunghlyanhtet Looks like none of our CI jobs currently generate coverage reports, so you'll have to enable those first. |
Thank you. I will fix it. |
@ti-mo I have made changes. Can you review it again, please? |
@saiaunghlyanhtet Why do coverage reports need to go into a separate directory? You're still not merging the output of the matrix jobs. |
@ti-mo |
Signed-off-by: saiaunghlyanhtet <[email protected]>
d3d14b3
to
379ed91
Compare
|
||
- name: Merge Coverage Reports | ||
run: | | ||
go tool covdata -merge coverage-reports/coverage-*.out -o coverage-merged.out |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
go tool covdata
doesn't work on the plaintext files generated with go test -coverprofile=
. It only works with the new binary format, which is currently a bit annoying to produce with go test
, see golang/go#66225 (comment). The cover directory needs to exist for this to work.
Documentation:
https://go.dev/doc/build-cover
https://go.dev/blog/integration-test-coverage
Please make sure your code (the commands executed, at least) work before pushing up your changes. It looks like you've been pushing commits blindly so far, which is not very respectful of a reviewer's time.
If you want to experiment with GHA workflows offline, take a look at https://github.com/nektos/act.
Integrate Code Coverage Reporting in CI Pipeline
Summary:
This pull request integrates code coverage reporting into the existing CI pipeline. The following updates have been made to the GitHub Actions workflow to ensure that code coverage is tracked and uploaded to the Coveralls service.
Changes:
Added Code Coverage Steps:
Test Coverage Reporting:
Impact:
Related Issues: