-
-
Notifications
You must be signed in to change notification settings - Fork 12
Don't require Codecov upload success for test run in fork #258
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
Merged
per1234
merged 2 commits into
arduino:main
from
per1234:codecov-upload-fail-conditional
Aug 13, 2021
Merged
Don't require Codecov upload success for test run in fork #258
per1234
merged 2 commits into
arduino:main
from
per1234:codecov-upload-fail-conditional
Aug 13, 2021
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The "Test Go" workflow uploads code coverage data to Codecov. There will occasionally be spurious upload failures caused by transient network outages. These will typically succeed after the workflow is re-run, but the option to re-run is not offered when the workflow run passes. Because it's important that the data be complete, the `codecov/codecov-action` action is configured to fail the workflow run if the upload does not succeed. However, the upload will never be able to succeed for workflow runs in a fork where the owner has not set up Codecov. For this reason, the `fail_ci_if_error` input setting is made conditional upon the repository name. The result is: - Coverage data upload success is required for all workflow runs in the `arduino/arduino-lint` repository, including those for PRs submitted from forks (this data is uploaded to the parent repo's Codecov account, so the upload is able to succeed regardless of whether Codecov is enabled for the fork). - Uploads are attempted for workflow runs in forks (because the fork owner might have Codecov set up and want the data), but they are not required to succeed and will fail silently.
Since this workflow uploads code coverage data to Codecov, the configuration file is relevant, and so the workflow should run any time this file is modified.
@per1234
per1234
added
type: bug
topic: infrastructure
Related to project infrastructure
labels
Aug 13, 2021
codecov-commenter
commented
Aug 13, 2021
Codecov Report
@@ Coverage Diff @@ ## main #258 +/- ## ======================================= Coverage 89.83% 89.83% ======================================= Files 43 43 Lines 6327 6327 ======================================= Hits 5684 5684 Misses 531 531 Partials 112 112
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report at Codecov.
|
umbynos
umbynos
approved these changes
Aug 13, 2021
@rsora
rsora
added
the
type: imperfection
Perceived defect in any part of project
label
Sep 22, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The "Test Go" workflow uploads code coverage data to Codecov. There will occasionally be spurious upload failures caused by transient network outages. These will typically succeed after the workflow is re-run, but the option to re-run is not offered when the workflow run passes.
Because it's important that the data be complete, the
codecov/codecov-action
action is configured to fail the workflow run if the upload does not succeed. However, the upload will never be able to succeed for workflow runs in a fork where the owner has not set up Codecov. For this reason, thefail_ci_if_error
input setting is made conditional upon the repository name.The result is:
arduino/arduino-lint
repository, including those for PRs submitted from forks (this data is uploaded to the parent repo's Codecov account, so the upload is able to succeed regardless of whether Codecov is enabled for the fork).