Skip to content
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

Merged
merged 1 commit into from
May 23, 2024
Merged

Codecov fixes #1729

merged 1 commit into from
May 23, 2024

Conversation

Dead2
Copy link
Member

@Dead2 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.

Copy link

codecov bot commented May 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.91%. Comparing base (4a99dd0) to head (8080114).
Report is 2 commits behind head on develop.

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.
📢 Have feedback on the report? Share it here.

@Dead2 Dead2 force-pushed the codecov-tweak branch 2 times, most recently from caa7f15 to 6c0aecf Compare May 18, 2024 21:26

- name: Upload reports
uses: codecov/codecov-action@v4
if: (env.CODECOV_TOKEN != '' || github.repository == 'zlib-ng/zlib-ng')
Copy link
Member

@nmoinvaz nmoinvaz May 19, 2024

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 != ''?

Copy link
Member Author

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..

Copy link
Member

@nmoinvaz nmoinvaz May 19, 2024

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.

Copy link
Member Author

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.

Copy link
Member Author

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.

@Dead2
Copy link
Member Author

Dead2 commented May 20, 2024

Rebased.

- Fix error in generating list of reports to upload.
- Clean up the implementation a bit.
@Dead2 Dead2 merged commit fb9a17a into develop May 23, 2024
291 checks passed
This was referenced May 30, 2024
@Dead2 Dead2 mentioned this pull request Jun 12, 2024
@Dead2 Dead2 deleted the codecov-tweak branch July 2, 2024 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants