Skip to content

Commit 1bd071d

Browse files
committed
Don't require Codecov upload success for test run in fork
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.
1 parent dab52f1 commit 1bd071d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/workflows/test-go-task.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,4 +70,4 @@ jobs:
7070
with:
7171
file: ${{ matrix.module.path }}coverage_unit.txt
7272
flags: ${{ matrix.module.codecov-flags }}
73-
fail_ci_if_error: true
73+
fail_ci_if_error: ${{ github.repository == 'arduino/library-registry-submission-parser' }}

0 commit comments

Comments
 (0)