Skip to content

ci: fail-soft on Codecov upload, fix coverage path#119

Open
trishorts wants to merge 1 commit into
masterfrom
fix/ci-codecov-fail-soft
Open

ci: fail-soft on Codecov upload, fix coverage path#119
trishorts wants to merge 1 commit into
masterfrom
fix/ci-codecov-fail-soft

Conversation

@trishorts

Copy link
Copy Markdown

Problem

All three open PRs (#116, #117, #118) fail the single Build and Test
check. The failure is not in any PR's code — restore, build, and tests all
pass (#116 shows 235 passed, 7 skipped, 0 failed across net472 + net6.0).
The only error is the Codecov upload step failing with exit code
4294967295.

Root cause

.github/workflows/dotnet.yml runs codecov/codecov-action@v3 with
fail_ci_if_error: true, so any Codecov upload error fails the entire job
regardless of test results. Two config issues make the upload error likely:

  • files: pointed at coverage.net6.0.xml, but the test step writes
    coverage.xml (/p:CoverletOutput='../../coverage.xml'), so the action
    had no file to upload.
  • The action ran on the deprecated v3 / Node 20 runner.

Fix

  • fail_ci_if_error: true -> false — a Codecov hiccup no longer fails CI.
  • Correct the coverage file path to ./coverage.xml.
  • Bump checkout, setup-dotnet, and codecov-action to v4 (clears the
    Node 20 deprecation warnings).

Note for maintainers

The underlying Codecov upload error is most likely a missing or expired
CODECOV repo secret (public-repo tokenless uploads get rate-limited).
With fail_ci_if_error: false the build is green either way, but refreshing
that secret would restore actual coverage reporting.

🤖 Generated with Claude Code

The Build and Test job failed on all open PRs (#116, #117, #118) because
the final Codecov step errored on upload (exit 4294967295) while
fail_ci_if_error was true, marking the whole job failed even though
restore, build, and tests all passed (235 passed, 0 failed).

- fail_ci_if_error: true -> false so a Codecov-side hiccup no longer
  fails the build
- fix coverage file path: coverage.net6.0.xml -> coverage.xml to match
  the Coverlet output (/p:CoverletOutput='../../coverage.xml')
- bump checkout/setup-dotnet/codecov-action v3 -> v4 to clear the
  Node 20 deprecation warnings

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@trishorts trishorts requested a review from rfellers June 20, 2026 20:41
@trishorts trishorts added the bug Something isn't working label Jun 20, 2026
@codecov

codecov Bot commented Jun 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.25%. Comparing base (08dc841) to head (c1935c4).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #119      +/-   ##
==========================================
- Coverage   89.65%   89.25%   -0.41%     
==========================================
  Files         103      103              
  Lines        5702     5721      +19     
  Branches      878      882       +4     
==========================================
- Hits         5112     5106       -6     
- Misses        424      429       +5     
- Partials      166      186      +20     

see 15 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant