-
Notifications
You must be signed in to change notification settings - Fork 6
Configure coverage reports #74
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
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅ 📢 Thoughts on this report? Let us know! |
|
Is there a way to ignore certain files for coverage. One issue I see with this is error.rs can't be fully cover in patches, thus it would fail every time when a new pull request adds errors. |
Synicix
left a comment
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.
I have a question about the patch coverage restriction. Check the github pull request comments.
|
@Synicix There is a way to ignore files but I think there's a better solution. Ideally, new features/enhancements would be considered complete if they include docs, pass existing tests, and are covered by new tests i.e. "testable". Keep in mind that patch only considers code that a contributor adds/changes. For errors, this should be doable so long as the error state is possible to replicate. Gave it another pass and added a couple of commits that shows some examples how to do that and simplified some stuff. With them I was able to raise the project coverage of
|
|
Man... still so much to learn from this codecov.io tool, it is pretty cool. I just learned that we can set the status check to I'm now leaning towards going with that so we can "live with it" for a while without blocking PR merges. That way we still have the opportunity of treating it case by case i.e. letting the reviewer decide whether to enforce it or allow exceptions. We can always switch it back later once we become more comfortable with how it is affecting our dev flow. Issuing one more commit to apply this config. |
|
Hmm, that is really cool and yeah, I agree, running with warning type check right now might be a good trial run to see how much it interferes before we fully commit it as a check. |
Now that we have our code coverage integrated into the dev flow and the report published somewhere, things have improved. However, it was still missing some tweaking so that it could be the ideal setup for coverage checks.
To address that, the config here:
llvm-covalso supports generating cobertura coverage reports which is also allowed to be uploaded to codecov.io. This kind of coverage treats partial coverage as fully covered (it might also be configurable) which better matches the reports generated from the stdout line coverage summary.codecov.yamlfile is how you can modify the codecov.io experience from the default. Codecov.io seems to prefer patch over project coverage and disables project coverage by default. I'd normally use project coverage but there appears to be a bug in it currently. Therefore, I've set and modified patch coverage to achieve the same intent: new/modified code introduced should be completely covered.bin/*) and the top-levellib.rsAlso added a badge on our README to highlight our current project code coverage and updated the docs.