Skip to content

Upload Cobertura coverage report to GitHub code coverage in CI - #69

Merged
framinosona merged 2 commits into
mainfrom
code-coverage-agent/setup-code-coverage-reporting
Nov 22, 2026
Merged

framinosona merged 2 commits into
mainfrom
code-coverage-agent/setup-code-coverage-reporting

Conversation

@code-coverage-agent

@code-coverage-agent code-coverage-agent AI commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

Summary

CI already ran tests with coverlet and produced a Cobertura report, but it was never surfaced to GitHub's code coverage API — it was only bundled into the generic tests artifact. This adds a dedicated coverage artifact upload and a job that publishes it via actions/upload-code-coverage.

Why

Developers had no PR-level or default-branch coverage visibility in GitHub, even though a trustworthy native Cobertura report was already being generated by coverlet.msbuild during dotnet test. Project-level coverage config was left untouched — it already works locally and in IDEs.

Change Type

  • CI/build/tooling

Affected Areas

  • Tests

Behavior And Compatibility

  • No externally visible behavior change

No build, toolchain, or job-structure changes — purely additive CI steps.

Changes

  • .github/workflows/ci.yml
    • build job: upload Output/Tests/coverage.cobertura.xml as a dedicated coverage-report-csharp artifact (skipped for fork PRs).
    • New upload-coverage-csharp job: downloads the artifact and publishes it with actions/upload-code-coverage@v1 (language: C#, label: code-coverage-agent), scoped with job-level code-quality: write permission.
    • No new triggers needed — existing pull_request/push (main/master) triggers already cover PR feedback and default-branch baseline.
  • .gitignore: added output//Output/ so generated coverage reports are never committed.

Tests

  • Not applicable (explain): CI/tooling-only change, no test code touched; verified locally that dotnet test -p:CollectCoverage=true -p:CoverletOutputFormat=cobertura produces a valid Cobertura XML report.

Documentation

  • Not applicable (explain): no public API or developer-facing docs affected.

Checklist

  • Commit messages follow Conventional Commits (type(scope): subject)
  • CI passes
  • Change is scoped to one logical unit of work

Co-authored-by: framinosona <2520362+framinosona@users.noreply.github.com>
@code-coverage-agent code-coverage-agent AI changed the title [WIP] Add code coverage reporting to CI workflows Upload Cobertura coverage report to GitHub code coverage in CI Nov 22, 2026
Code Coverage Agent finished work on behalf of framinosona November 22, 2026 20:28
@code-coverage-agent
code-coverage-agent AI marked this pull request as ready for review November 22, 2026 20:28
@github-code-quality

Copy link
Copy Markdown

Code coverage overview

Languages: C#

C# / code-coverage-agent

main code-coverage-agent/... e071bb7 +/-
— 89% —

Line coverage data for the main branch is not yet available.

View coverage of the 10 most covered files.
File main code-coverage-agent/... e071bb7 +/-
ListExtensions.cs — 100% —
EnumerableExtensions.cs — 98% —
TimeSpanExtensions.cs — 95% —
UriExtensions.cs — 95% —
NumericRangeTools.cs — 94% —
ExceptionExtensions.cs — 89% —
DictionaryExtensions.cs — 85% —
StringExtensions.cs — 77% —
AssemblyExtensions.cs — 77% —
StreamExtensions.cs — 75% —

ℹ️ Calculations represent line coverage. Results may change as calculations are updated.

@github-actions

Copy link
Copy Markdown

Test Results

476 tests  ±0   476 ✅ ±0   2s ⏱️ ±0s
  1 suites ±0     0 💤 ±0 
  1 files   ±0     0 ❌ ±0 

Results for commit e071bb7. ± Comparison against base commit 2263c84.

@framinosona
framinosona merged commit bbb6344 into main Nov 22, 2026
13 checks passed
@framinosona
framinosona deleted the code-coverage-agent/setup-code-coverage-reporting branch November 22, 2026 20:49
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.

2 participants