-
Notifications
You must be signed in to change notification settings - Fork 100
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
action: update workflow to block low unit test coverage code #460
Conversation
wait_for_ci: false | ||
|
||
# When modifying this file, please validate using | ||
# curl -X POST --data-binary @codecov.yml https://codecov.io/validate |
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.
Maybe add a blank line here, others LGTM.
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.
Fixed.
756b41c
to
6c4c491
Compare
1. The project's unit test coverage cannot be reduced by more than 0.5%. 2. The unit test coverage of each patch must be higher than 75%. Signed-off-by: Qinqi Qu <[email protected]>
6c4c491
to
689c25c
Compare
Smoke tests usually fail and may need to be re-run. |
@imeoer Should we bump the nydus-image for
|
Could you please share a page showing this newly added coverage action results? |
@changweige This PR does not add a new action, it just adds a coverage check to the existing action, you can refer to following links. They are a check result of this PR: dragonflyoss/nydus#1225 |
In order to improve the code quality of this project, we have introduced a test coverage check in CI to prevent code with low unit test coverage from being merged. Although there is no perfect code coverage value, we can still make a stab at such a value. 3 years ago, Google posted a blog post on their best practices:
Therefore, in order to increase the overall code coverage of this project to 60% mentioned in #334, we set the coverage of each patch to 75% and above.
Patch details:
Reference: https://about.codecov.io/blog/the-case-against-100-code-coverage/