FLUID-6529: Uploading coverage reports to codecov.io#1002
FLUID-6529: Uploading coverage reports to codecov.io#1002cindyli merged 16 commits intofluid-project:mainfrom
Conversation
ccfc3f2 to
e6264b4
Compare
|
@gtirloni and @cindyli do you think you could look over this PR? It doesn't look like Coveralls is able to report results to the PR because of the GitHub Actions restrictions related to secrets and tokens. I was hoping the coveralls bot would be able to do that but it might just be for private repos. You should be able to view the results from https://coveralls.io/github/fluid-project/infusion |
|
Yeah, I think the default token won't work because it gets read-only access only. Have you looked at codecov.io? It looks like that one would work with webhooks only and not need a GH Actions step but I could be mistaken. |
Codecov Report
@@ Coverage Diff @@
## main #1002 +/- ##
=======================================
Coverage ? 88.12%
=======================================
Files ? 81
Lines ? 10891
Branches ? 2346
=======================================
Hits ? 9598
Misses ? 728
Partials ? 565
Flags with carried forward coverage won't be shown. Click here to find out more. |
|
@cindyli, @amb26, and @gtirloni would you mind to review this PR to add the coverage reporting to the PRs. It's using https://codecov.io right now. A few things to note:
|
|
CCing in @the-t-in-rtf |
|
@amb26, were you just keeping me informed, or did you want help figuring out specific issues here? |
|
I applaud the goal and don't see anything particularly worrying about their approach. I like that you started with a package that has both nyc and testem tests, that's a helpful example for other work. I guess we can't see some of the value because we haven't already been using it for a while. If you could dig up an example PR in an existing project that demonstrates the full output, that would be good. I know that their docs probably have examples, but it'd be nice to see someone other than them using it in anger and confirm what it should look like down the road. |
|
@the-t-in-rtf here's an example of it being used by their own repo for their GitHub Action codecov/codecov-action#96 and here's another example where there was a coverage change and caused a failure codecov/codecov-node#160 |
|
Is there any option to have a shorter (or no) summary if there are no problems? The full details are always available in the checks block anyway. |
@the-t-in-rtf, the coverage summary comment can be removed if there are no changes https://docs.codecov.io/docs/pull-request-comments#requiring-changes The coverage summary comment can also be completely disabled https://docs.codecov.io/docs/pull-request-comments#disable-comment Please let me know your thoughts on these options. |
|
I'm not sure how valuable it is as a comment, and it's huge. If it were just up to me I'd leave it just in the checks. What do other people think? |
|
@the-t-in-rtf @jobara I'm all for leaving it in the checks rather than having the comment appear. |
greatislander
left a comment
There was a problem hiding this comment.
Status badge needs to be updated to point to main.
README.md
Outdated
| # Infusion | ||
|
|
||
|  | ||
| [](https://codecov.io/github/fluid-project/infusion?branch=master) |
There was a problem hiding this comment.
| [](https://codecov.io/github/fluid-project/infusion?branch=master) | |
| [](https://codecov.io/github/fluid-project/infusion?branch=main) |
The PR comment is quite large and may clutter PR UI. Instead just rely on the GitHub checks for reporting coverage.
|
@the-t-in-rtf and @greatislander I've made the changes recommended. Ready for more review. |
|
@cindyli would you be able to take a pass over this PR and merge if good? |
|
This PR sets the minimum coverage ratio to 90%. The coverage report from the check in this PR shows the current coverage is 88.16%, which is below the minimum ratio of 90%, but the check didn't report a failure. Please let me know if I misunderstand something. Thanks. Instead of setting a hard ratio, I wonder if it makes more sense to use the value |
|
@cindyli I think that makes a lot of sense. |
greatislander
left a comment
There was a problem hiding this comment.
Suggest changing target to auto as per @cindyli.
.codecov.yml
Outdated
| status: | ||
| project: | ||
| default: | ||
| target: 90% |
There was a problem hiding this comment.
| target: 90% | |
| target: auto |
This is because there is a 2% threshold set, so the coverage is allowed to drop below the target by that amount before reporting an error. That was sort of their to help us get back up, but we can remove the threshold and as well and switch to |
|
@jobara Ah, that makes sense. I don't think we need to remove the threshold, then. |
Makes sense. This explains why the check didn't report a failure. I agree to keep the 2% threshold but leaning towards to use |
The problem though is that each subsequent commit could continuously lower the baseline.. so the next one reduce coverage to 88%, followed by 87%, 86% and etc. without ever reporting an error. |
Right. Depending on how much dropping tolerance will be picked for the coverage, I'd prefer it's explicitly expressed without a hidden meaning. For example, if it's zero tolerance, as you said, values could be |
|
@cindyli ready for more review. I've changed to |
https://issues.fluidproject.org/browse/FLUID-6529