-
Notifications
You must be signed in to change notification settings - Fork 468
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
Improve Codecov settings #1629
base: master
Are you sure you want to change the base?
Improve Codecov settings #1629
Conversation
Vampire
commented
Apr 11, 2023
•
edited
Loading
edited
- Fail the CI build if the Codecov uploading failed.
- Show more detailed information in the Codecov comment.
- Do not update the Codecov comment 13 times, but post it after all 14 reports were uploaded.
- Ignore dates in coverage reports to not get "upload expired" because the report was taken from remote build cache.
b00a504
to
628741d
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1629 +/- ##
============================================
+ Coverage 80.44% 81.86% +1.41%
- Complexity 4337 4575 +238
============================================
Files 441 446 +5
Lines 13534 14342 +808
Branches 1707 1814 +107
============================================
+ Hits 10888 11741 +853
+ Misses 2008 1935 -73
- Partials 638 666 +28 |
codecov.yml
Outdated
|
||
comment: | ||
layout: "reach, diff, flags, files" | ||
after_n_builds: 14 |
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.
This seems like it is likely to break if we change the number of builds in the matrices, at least create a comment pointing to this file/line in the workflows.
Is there a way to somehow set this in the workflow and compute the number of builds from the matix?
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.
Indeed, if you upload more reports, you will then have comment updates again.
If you upload less reports, you will notice that no comment is coming in.
I personally always was a bit confused when the first comment reduces the coverage and then edits and edits come in that increase the coverage, so I thought I put this in alongside.
Actually I've read it in a newsletter and it was my main intent to set that property. :-D
I don't think you can calculate it from the matrix unless you add a parser that parses the workflow file and interprets it to calculate how many iterations it will be.
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.
We could change the workflow files to instead be written in Kotlin using https://github.com/typesafegithub/github-workflows-kt. That's a really nice project I use for all my GitHub workflows now. And that could indeed then be used to calculate the value and generate a step that updates the Codecov file.
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 added one commit that now calculates the value from the build matrix.
But I also marked the PR as "Draft" as it now depends on #1630.
81ef0a3
to
c060507
Compare
73dcbcf
to
a6f5543
Compare
a2c77f9
to
3239882
Compare
abcf1d8
to
fefe78e
Compare
e6fee6d
to
4918b4c
Compare
7d65ff6
to
b0ce2f9
Compare
2081790
to
d3e9eb1
Compare
c3a6678
to
b754360
Compare
Fail the CI build if the Codecov uploading failed. Show more detailed information in the Codecov comment. Do not update the Codecov comment 15 times, but post it after all 16 reports were uploaded. Ignore dates in coverage reports to not get "upload expired" because the report was taken from remote build cache.
b754360
to
b1370be
Compare