-
Notifications
You must be signed in to change notification settings - Fork 4
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
Add badges and a workflow for coverage #7
Conversation
See https://github.com/marketplace/actions/go-coverage-report Signed-off-by: Justin Kulikauskas <[email protected]>
PR Review
✨ Review tool usage guide:Overview: The tool can be triggered automatically every time a new PR is opened, or can be invoked manually by commenting on any PR.
See the review usage page for a comprehensive guide on using this tool. |
@@ -37,3 +37,13 @@ jobs: | |||
|
|||
- run: | | |||
make test | |||
|
|||
- name: Update coverage report | |||
uses: ncruces/go-coverage-report@v0 |
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.
Suggestion: It's recommended to use a specific version of the GitHub Action rather than the default branch or a zero major version. This practice ensures that your workflows are not broken by changes made in newer versions of the Action. [best practice]
uses: ncruces/go-coverage-report@v0 | |
uses: ncruces/go-coverage-report@v1.0.0 # Replace with the latest stable version |
with: | ||
coverage-file: cover.out | ||
report: true | ||
chart: false | ||
amend: false | ||
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} |
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.
Suggestion: The condition for running the coverage report step seems to be intended only for pushes to the main branch. However, the syntax used in the 'if' condition might not work as expected because it's inside the 'with' block. It should be moved outside to the step level. [bug]
with: | |
coverage-file: cover.out | |
report: true | |
chart: false | |
amend: false | |
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} | |
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} | |
with: | |
coverage-file: cover.out | |
report: true | |
chart: false | |
amend: false |
chart: false | ||
amend: false | ||
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} | ||
continue-on-error: true |
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.
Suggestion: Consider setting 'continue-on-error' to false for critical steps such as coverage reporting unless it's explicitly acceptable for these steps to fail without failing the entire workflow. This ensures that any issues with the coverage reporting are addressed promptly. [best practice]
continue-on-error: true | |
continue-on-error: false |
AI Suggestions Score
|
See https://github.com/marketplace/actions/go-coverage-report