Skip to content

Replace Codecov with GitHub native code coverage - #9918

Merged
glen-84 merged 1 commit into
mainfrom
gai/github-native-code-coverage
Jun 15, 2026
Merged

glen-84 merged 1 commit into
mainfrom
gai/github-native-code-coverage

Conversation

@glen-84

@glen-84 glen-84 commented Jun 15, 2026

Copy link
Copy Markdown
Member

Summary

  • Replaces the Codecov upload in both CI workflows (ci.yml for PRs, coverage.yml for main) with GitHub's native code coverage: the per-project Cobertura reports are merged with dotnet-coverage merge and the single result is uploaded via actions/upload-code-coverage (SHA-pinned), with code-quality: write scoped to the upload-coverage job.
  • Deletes .github/codecov.yml and drops the CODECOV_TOKEN usage. The test matrix and coverage collection are unchanged.
  • Fork-PR coverage is intentionally not carried over: GitHub's native feature does not support PRs from forks yet (acknowledged upstream as a roadmap item).

Test plan

  • Validated the merge locally against a real coverage.yml run's 125 coverage-* artifacts: dotnet-coverage 18.8.0 merge … -f cobertura produced one valid Cobertura report (150 packages, 13,642 classes, line-rate ~0.49).
  • Workflows pass YAML parsing and actionlint (the code-quality permission-scope warning is a known actionlint gap for this preview feature).
  • After merge, requires "Code Quality" enabled on the repo; then the Upload Coverage job should be green and github-code-quality[bot] should post a coverage summary on PRs. The CODECOV_TOKEN secret can then be deleted.

Copilot AI review requested due to automatic review settings June 15, 2026 12:16

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR migrates CI coverage reporting from Codecov to GitHub’s native code coverage feature by merging per-project Cobertura reports into a single report and uploading it via actions/upload-code-coverage.

Changes:

  • Replaces Codecov upload steps in both PR CI (ci.yml) and main-branch coverage (coverage.yml) with a dotnet-coverage merge + actions/upload-code-coverage flow.
  • Adds scoped job permissions for the upload job (code-quality: write) and removes reliance on CODECOV_TOKEN.
  • Removes the Codecov configuration file (.github/codecov.yml).

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
.github/workflows/coverage.yml Merge Cobertura artifacts on main pushes and upload merged report to GitHub code coverage with scoped permissions.
.github/workflows/ci.yml Same coverage merge + GitHub upload flow for PR CI runs, replacing Codecov usage.
.github/codecov.yml Deleted since Codecov is no longer used.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-code-quality

Copy link
Copy Markdown

Code Coverage Overview

Languages: C#

C# / code-coverage/dotnet

The overall coverage in the gai/github-native-co... branch is 49%. Coverage data for the main branch is not yet available.

Show a code coverage summary of the most covered files.
File main gai/github-native-co... c2c213e +/-
/home/runner/wo.../FieldResult.cs — 100% —
/home/runner/wo...SchemaMerger.cs — 98% —
/home/runner/wo...xecutionTree.cs — 92% —
/home/runner/wo...ationPlanner.cs — 88% —
/home/runner/wo...mentRewriter.cs — 87% —
/home/runner/wo...eBuilderBase.cs — 85% —
/home/runner/wo...xGenerator.g.cs — 80% —
/home/runner/wo...hResultStore.cs — 80% —
/home/runner/wo...xGenerator.g.cs — 71% —
/home/runner/wo...lient.Client.cs — 1% —

Code Coverage is in Public Preview. Learn more and provide us with your feedback.

@glen-84
glen-84 merged commit dea8803 into main Jun 15, 2026
146 checks passed
@glen-84
glen-84 deleted the gai/github-native-code-coverage branch June 15, 2026 12:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants