Skip to content

Don't require Codecov upload success for test run in fork #66

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
merged 1 commit into from
Aug 13, 2021
Merged

Don't require Codecov upload success for test run in fork #66

merged 1 commit into from
Aug 13, 2021

Conversation

per1234
Copy link
Contributor

@per1234 per1234 commented Aug 13, 2021

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/library-registry-submission-parser repository, including those for PRs submitted from forks (this data is uploaded to the arduino/library-registry-submission-parser 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.

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/library-registry-submision-parser`
  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.
@per1234 per1234 added type: imperfection Perceived defect in any part of project topic: infrastructure Related to project infrastructure labels Aug 13, 2021
@per1234 per1234 requested a review from umbynos August 13, 2021 08:35
@codecov-commenter
Copy link

Codecov Report

Merging #66 (1bd071d) into main (dab52f1) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main      #66   +/-   ##
=======================================
  Coverage   28.62%   28.62%           
=======================================
  Files           1        1           
  Lines         269      269           
=======================================
  Hits           77       77           
  Misses        188      188           
  Partials        4        4           
Flag Coverage Δ
unit 28.62% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update dab52f1...1bd071d. Read the comment docs.

@per1234 per1234 merged commit 86cc80c into arduino:main Aug 13, 2021
@per1234 per1234 deleted the codecov-upload-fail-conditional branch August 13, 2021 09:39
@per1234 per1234 self-assigned this Nov 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: infrastructure Related to project infrastructure type: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants