Skip to content

ci(coverage): upload Go coverage to Codecov via OIDC - #150

Merged
scttbnsn merged 2 commits into
dev/v0.9from
ci/codecov-oidc-upload
Aug 17, 2026
Merged

scttbnsn merged 2 commits into
dev/v0.9from
ci/codecov-oidc-upload

Conversation

@scttbnsn

@scttbnsn scttbnsn commented Aug 17, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Re-adds Codecov coverage upload to the Go CI test lane, per the org's coverage-cloud standard codified 2026-08-16/17 (Codecov replaces Qlty Cloud's coverage upload; Qlty Cloud stays installed non-gating for its maintainability signal). Rollout order is drydock, then portwing — drydock's own fix is tracked separately and out of scope here.
  • portwing's Go test job lives in the shared reusable workflow (CodesWhat/.github/.github/workflows/go-ci.yml), so this doesn't touch that job directly. Instead, a new non-gating 📊 Coverage: Codecov Upload job in ci-verify.yml needs: go-ci, downloads the go-test-${{ github.run_id }}-${{ github.run_attempt }} artifact (which already carries coverage.out from scripts/ci/go-test.sh, uploaded if: always()), and uploads it via codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f (v7.0.0).
  • Tokenless OIDC (use_oidc: true, job-level id-token: write only — no workflow-level grant, no CODECOV_TOKEN to store or rotate).
  • Non-gating by design: fail_ci_if_error: false plus continue-on-error: true on both the artifact download and the upload step, so a Codecov hiccup can never flake the required Build & Test context. The job is named distinctly (📊 Coverage: Codecov Upload) so it can't collide with any required status check.
  • Harden Runner egress allow-list added for the Codecov hosts this action actually talks to (verified against codecov/codecov-action's action.yml/dist/codecov.sh at the pinned SHA): api.codecov.io, cli.codecov.io (CLI download + version + SHA256SUM), keybase.io (GPG signature verification of the downloaded CLI), storage.googleapis.com (report upload), plus github.com/api.github.com/results-receiver.actions.githubusercontent.com for checkout and the Artifacts v4/v8 download.
  • CHANGELOG.md ### Added bullet under [Unreleased].

Context

portwing shipped a Codecov ratchet at v0.5.0 (3278707) and reversed it days later in #35 (5baaefd) when the org briefly consolidated coverage on Qlty Cloud. Codecov's dashboard for this repo still shows that fossil: exactly four uploads, all from 2026-06-23, frozen at 73.5%. This PR replaces that stale snapshot with a live, continuously-updating pipeline — expect the badge/number to move on the first successful run here.

Test plan

  • actionlint .github/workflows/ci-verify.yml — clean
  • zizmor .github/workflows/ci-verify.yml (offline mode) — no findings
  • Full lefthook pre-push suite (goreleaser-snapshot, go-lint, qlty, go-test, govulncheck, go-fuzz, actionlint, zizmor, web, clean-tree) — all green
  • CI run on this PR shows the new 📊 Coverage: Codecov Upload job succeeding and a fresh upload landing in Codecov

Changelog

  • ✨ Added a non-gating codecov job after go-ci.
  • ✨ Added artifact download and coverage.out upload through pinned Codecov action.
  • 🔒 Added tokenless OIDC authentication with read-only repository access.
  • 🔒 Restricted Harden Runner egress to required hosts.
  • 🔧 Updated the changelog.

Concerns

  • Confirm a successful Codecov upload in CI.
  • Verify artifact-download and Codecov failures remain non-blocking.

@coderabbitai

coderabbitai Bot commented Aug 17, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: b3438b37-f03f-4fc3-ad33-8cca4b297e16

📥 Commits

Reviewing files that changed from the base of the PR and between 6f5c805 and 68db9db.

⛔ Files ignored due to path filters (1)
  • CHANGELOG.md is excluded by !CHANGELOG.md
📒 Files selected for processing (1)
  • .github/workflows/ci-verify.yml

Included review availability: Your plan includes up to 1 review per rolling hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The CI workflow adds a codecov job that runs after go-ci. The job uses hardened egress restrictions, pinned actions, read-only repository access, and id-token: write. It downloads Go test coverage artifacts and uploads coverage.out to Codecov with tokenless OIDC authentication. Artifact and upload failures do not block the workflow.

Merge Risk: ⚪ Minimal · up to 68db9

The PR adds a non-gating, tokenless Codecov upload job without changing required build or test behavior; no actionable merge-blocking risk remains beyond normal checks and review.

🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ci/codecov-oidc-upload

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@vercel

vercel Bot commented Aug 17, 2026

Copy link
Copy Markdown

Deployment failed for project getportwing with the following error:

Resource is limited - try again in 24 hours (more than 100, code: "api-deployments-free-per-day").

Learn More: https://vercel.com/codeswhat?upgradeToPro=build-rate-limit

@scttbnsn

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 17, 2026 •

Copy link
Copy Markdown
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@scttbnsn

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 17, 2026 •

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@scttbnsn
scttbnsn merged commit ed4cab5 into dev/v0.9 Aug 17, 2026
24 of 26 checks passed
@scttbnsn
scttbnsn deleted the ci/codecov-oidc-upload branch August 19, 2026 17:35
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