Skip to content

ci: add Go test coverage reporting with Codecov#1098

Merged
kswap merged 3 commits into
mainfrom
ft_code_cov
May 18, 2026
Merged

ci: add Go test coverage reporting with Codecov#1098
kswap merged 3 commits into
mainfrom
ft_code_cov

Conversation

@kswap
Copy link
Copy Markdown
Contributor

@kswap kswap commented May 18, 2026

Description

Integrates Codecov for Go test coverage reporting.

Changes

  • Uploads the merged coverage profile to Codecov using OIDC tokenless auth — no stored secret required
  • Adds id-token: write permission to the reusable workflow job and its caller
  • Adds codecov.yml with informational-only status checks (non-blocking)
  • Removes the custom PR comment in favour of Codecov's native comment, which includes diff coverage and a file-level breakdown

Codecov dashboard

https://app.codecov.io/gh/hashicorp/consul-dataplane

@kswap kswap requested review from a team as code owners May 18, 2026 11:05
Upload merged coverage profile to Codecov using OIDC (no stored token needed).
Add id-token: write permission to both the reusable workflow job and its caller.
Add codecov.yml with project threshold (2% drop allowed) and patch threshold
(70% coverage required on new code).
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 18, 2026

Go Test Coverage: 66.3%

See the workflow run for the full per-package breakdown and downloadable HTML report.

@codecov-commenter
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 ☂️

@kswap kswap enabled auto-merge (squash) May 18, 2026 12:30
@kswap kswap added the pr/no-changelog This PR does not introduce a user-facing change that should be reflected in the changelog label May 18, 2026
Both posted different numbers (awk counts statements, Codecov counts lines).
Codecov's comment is more useful — it includes diff coverage and a file tree link.
Copy link
Copy Markdown
Member

@krutibaraiya krutibaraiya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kswap kswap merged commit 67d34f3 into main May 18, 2026
42 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr/no-changelog This PR does not introduce a user-facing change that should be reflected in the changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants