-
Notifications
You must be signed in to change notification settings - Fork 353
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
ci: fix codecov upload issue #3421
Conversation
Signed-off-by: Shahar Harari <shahar.harari@sap.com>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3421 +/- ##
==========================================
+ Coverage 66.97% 67.41% +0.43%
==========================================
Files 164 166 +2
Lines 23882 19184 -4698
==========================================
- Hits 15994 12932 -3062
+ Misses 6964 5322 -1642
- Partials 924 930 +6 ☔ View full report in Codecov by Sentry. |
Signed-off-by: Shahar Harari <shahar.harari@sap.com>
Works as expected:
|
/retest |
# only use oidc for push events or PRs from the same repo, since PRs from forks cannot fetch an OIDC token | ||
# Codecov supports Token-less Uploads for PRs from forks: | ||
# https://docs.codecov.com/docs/codecov-uploader#supporting-token-less-uploads-for-forks-of-open-source-repos-using-codecov | ||
use_oidc: ${{ github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) }} |
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.
should we keep this simple - event is push ? so we encourage PRs via forks only
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.
updated
Signed-off-by: Shahar Harari <shahar.harari@sap.com>
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.
LGTM thanks !
According to codecov/codecov-action#1404 |
/retest |
@arkodg we can switch to |
@arkodg this won't work for use_oidc: ${{ github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) }} Once |
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.
lgtm, thanks for the fix
See #3439 |
What this PR does / why we need it:
Fixed codecov upload issue by configuring authentication with oidc.
In case PR is from fork OIDC will not work since PRs from forks have
read
permission onid-token
.Anyway Codecov supports Token-less Uploads for PRs from forks.
Also set
fail_ci_if_error
back totrue
.Which issue(s) this PR fixes:
Fixes #