-
Notifications
You must be signed in to change notification settings - Fork 72
Report unit test coverage in presubmit checks #695
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
Comments
@liu-cong for the short term, what do you think about just reporting the coverage, and a follow up issue to tighten up the CI? I'd hate to implement this all in one swing and have a sudden bottleneck due to poor coverage. I think if we see where we are at first, and then act as needed (write more tests, or if we are in a good spot, add enforcement) |
This is perfectly reasonable 👍 I think just having the coverage report will motivate people on thinking more on testing |
Issue context:
Some of these having 0% coverage (such as the /api or /client-go) is perfectly acceptable, others, less acceptable. |
Thanks for sharing the example. This looks like total coverage, not incremental coverage, right? To deliver the first phase, concretely we should:
|
What would you like to be added:
Our presubmit unit test checks should report incremental test coverage, and fail the check if the coverage is below a certain threshold (say 80%), and allow the maintainers to override it (in certain cases it's reasonable to have a low coverage, e.g., code better tested in e2e tests, or to expedite a bug fix with follow up test coverage).
Why is this needed:
As the project becomes more mature, we should really emphasize on testing and reliability.
The text was updated successfully, but these errors were encountered: