-
-
Notifications
You must be signed in to change notification settings - Fork 250
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
Codecov fixes #1729
Codecov fixes #1729
Conversation
Dead2
commented
May 18, 2024
- Make codecov uploads happen even if some jobs have failed.
- Fix error in generating list of reports to upload.
- Clean up the implementation a bit.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #1729 +/- ##
============================================
+ Coverage 0 82.91% +82.91%
============================================
Files 0 136 +136
Lines 0 10294 +10294
Branches 0 2801 +2801
============================================
+ Hits 0 8535 +8535
- Misses 0 1059 +1059
- Partials 0 700 +700 ☔ View full report in Codecov by Sentry. |
caa7f15
to
6c0aecf
Compare
|
||
- name: Upload reports | ||
uses: codecov/codecov-action@v4 | ||
if: (env.CODECOV_TOKEN != '' || github.repository == 'zlib-ng/zlib-ng') |
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.
Shouldn't this still be env.CODECOV_TOKEN != ''
for forks? Or maybe secrets.CODECOV_TOKEN != ''
?
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 assume you mean to disable this job for forks that don't have CODECOV_TOKEN set?
The problem with that is that it then also hinders forks from being able to have codecov with tokenless uploads as required for pull requests from 3rd parties.
So this way forks without secrets.CODECOV_TOKEN set will get a failed upload CI job (I'd say that is a minor inconvenience at worst), but those that do care about codecov and want to be able to receive pull requests from others can have that work as well.
It could maybe be improved with tests for pushes vs pull requests though, but you'd still get a failed upload for pull requests to repos with no associated codecov account.
Only having if: (env.CODECOV_TOKEN != ''
would break on pull requests to all repos, also ours.
Not sure there is a way to please everyone..
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.
Why remove this line at all? Seems like || github.repository covers tokenless.
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.
The problem with keeping it is that tokenless uploads for all downstream repos remains broken, and tokenless is required for pull requests. So codecov would remain broken for pull-requests to downstream repos.
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.
Reinstated the if as it was so that we can land this PR. That does mean that codecov remains broken for PRs to all downstream repos.
Rebased. |
- Fix error in generating list of reports to upload. - Clean up the implementation a bit.