Skip to content

Upload coverage with codecov-action and OIDC - #27

Merged
nebhale merged 1 commit into
mainfrom
codecov-oidc
Nov 16, 2026
Merged

nebhale merged 1 commit into
mainfrom
codecov-oidc

Conversation

@nebhale

@nebhale nebhale commented Nov 16, 2026

Copy link
Copy Markdown
Owner

Summary

  • Replace bash <(curl -s https://codecov.io/bash) with codecov/codecov-action@v7, authenticated with OIDC (use_oidc: true, job id-token: write plus contents: read).
  • Run cargo tarpaulin --out xml and upload ./cobertura.xml.

Why

Notes

  • OIDC is unavailable on fork and Dependabot PRs; the upload step does not fail CI there (fail_ci_if_error defaults to false).
  • To use a token instead, add CODECOV_TOKEN and swap use_oidc: true for token: ${{ secrets.CODECOV_TOKEN }}.
  • This PR's CI run is the first real test of the new report and upload.

🤖 Generated with Claude Code

The deprecated Codecov Bash uploader has been failing with "Token
required - not valid tokenless upload", so no coverage was reaching
Codecov. Replace it with codecov/codecov-action, authenticated with the
workflow's OIDC token.

Tarpaulin only wrote target/tarpaulin/*-coverage.json, which Codecov
does not ingest, so also ask it for Cobertura XML (--out xml) and
upload that.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@nebhale
nebhale merged commit 3ca363e into main Nov 16, 2026
1 check passed
@nebhale
nebhale deleted the codecov-oidc branch November 16, 2026 21:33
@codecov

codecov Bot commented Nov 16, 2026

Copy link
Copy Markdown

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

Thanks for integrating Codecov - We've got you covered ☂️

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant