From cfa880ad2e66cc412007c3a979529a5ef49c4385 Mon Sep 17 00:00:00 2001 From: ChrisRackauckas-Claude Date: Sat, 30 May 2026 10:25:54 -0400 Subject: [PATCH] CI: make coverage upload and cache save non-fatal Almost every red check on recent runs was infrastructure, not a test failure: - `codecov/codecov-action@v6` ran with `fail_ci_if_error: true` in Tests.yml and Downstream.yml, so a coverage-upload failure (token, rate limit, codecov outage, or the empty CODECOV_TOKEN on fork PRs) failed the whole job even though `julia-runtest` had already passed. Verified on master `72fa309`: SciMLBase.jl/Core, DiffEqBase.jl/Core, OrdinaryDiffEq.jl/Core and DiffEqBase.jl/Downstream2 all failed only on the codecov step. - `julia-actions/cache@v3`'s save (post) step fails to authenticate with the cache backend on some self-hosted runners ("Server failed to authenticate the request" / "ENOENT: cache.tzst"), failing the job after the tests passed. Coverage upload and cache save are reporting/infrastructure steps; a failure in either must not turn a green test run red. This sets `fail_ci_if_error: false` and adds `continue-on-error: true` to the codecov steps (mirroring the existing GPU.yml setting, and guarding the residual non-zero exit the action returns with an empty token), and `continue-on-error: true` to the cache step. Test steps are unchanged, so a real test failure still fails CI. Co-Authored-By: Chris Rackauckas --- .github/workflows/Downstream.yml | 6 +++++- .github/workflows/GPU.yml | 3 +++ .github/workflows/Tests.yml | 9 ++++++++- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/.github/workflows/Downstream.yml b/.github/workflows/Downstream.yml index ec171e7c..e90327fc 100644 --- a/.github/workflows/Downstream.yml +++ b/.github/workflows/Downstream.yml @@ -63,7 +63,11 @@ jobs: end - uses: julia-actions/julia-processcoverage@v1 - uses: codecov/codecov-action@v6 + # Coverage upload is a reporting step; an upload failure (e.g. the empty + # CODECOV_TOKEN on fork PRs, rate limits, codecov outages) must not fail a + # green downstream test job. + continue-on-error: true with: files: lcov.info token: ${{ secrets.CODECOV_TOKEN }} - fail_ci_if_error: true + fail_ci_if_error: false diff --git a/.github/workflows/GPU.yml b/.github/workflows/GPU.yml index 027f1502..bab40d66 100644 --- a/.github/workflows/GPU.yml +++ b/.github/workflows/GPU.yml @@ -32,6 +32,9 @@ jobs: GROUP: "GPU" - uses: julia-actions/julia-processcoverage@v1 - uses: codecov/codecov-action@v6 + # `fail_ci_if_error: false` is not enough: the action still exits non-zero + # when the token is empty (e.g. fork PRs), so guard the step itself. + continue-on-error: true with: files: lcov.info token: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/Tests.yml b/.github/workflows/Tests.yml index 9a97a50f..584bdb92 100644 --- a/.github/workflows/Tests.yml +++ b/.github/workflows/Tests.yml @@ -46,6 +46,10 @@ jobs: with: version: "${{ matrix.version }}" - uses: julia-actions/cache@v3 + # The cache save (post) step fails to authenticate with the cache backend + # on some self-hosted runners; a cache miss must not fail an otherwise + # green test job. + continue-on-error: true with: token: "${{ secrets.GITHUB_TOKEN }}" - uses: julia-actions/julia-buildpkg@v1 @@ -64,7 +68,10 @@ jobs: directories: "src,ext" - uses: codecov/codecov-action@v6 if: "${{ github.event.pull_request.head.repo.full_name == github.repository }}" + # Coverage upload is a reporting step; an upload failure (token, rate + # limit, codecov outage) must not fail a green test job. + continue-on-error: true with: files: lcov.info token: "${{ secrets.CODECOV_TOKEN }}" - fail_ci_if_error: true + fail_ci_if_error: false