Skip to content

Add code coverage collection and Codecov badge#39

Merged
dex3r merged 4 commits into
mainfrom
copilot/add-test-code-coverage
Mar 1, 2026
Merged

Add code coverage collection and Codecov badge#39
dex3r merged 4 commits into
mainfrom
copilot/add-test-code-coverage

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 1, 2026

The CI pipeline had no code coverage instrumentation or reporting. This adds coverage collection and surfaces results via a Codecov badge in the README.

Changes

  • CI workflow — passes --collect:"XPlat Code Coverage" --results-directory ./coverage to dotnet test, then uploads results with codecov/codecov-action@v5
  • README.md — adds Codecov badge pointing to main branch coverage report

Both test projects already referenced coverlet.collector, so no .csproj changes were needed.

The Codecov badge will become active once the repo is connected at codecov.io.

Original prompt

This section details on the original issue you should resolve

<issue_title>Add a test code coverage</issue_title>
<issue_description>Calculate it and display it in Readme.md as a badge</issue_description>

Comments on the Issue (you are @copilot in this section)


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Co-authored-by: dex3r <3155725+dex3r@users.noreply.github.com>
Copilot AI changed the title [WIP] Add test code coverage and display badge in Readme.md Add code coverage collection and Codecov badge Mar 1, 2026
Copilot finished work on behalf of dex3r March 1, 2026 14:36
@dex3r dex3r marked this pull request as ready for review March 1, 2026 15:08
Copilot AI review requested due to automatic review settings March 1, 2026 15:08
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds automated code coverage collection to the existing .NET CI pipeline and surfaces repository coverage status via a Codecov badge in the README, addressing the lack of coverage reporting in CI.

Changes:

  • Update CI to run dotnet test with XPlat Code Coverage collection and store results under ./coverage.
  • Upload collected coverage artifacts to Codecov using codecov/codecov-action@v5.
  • Add a Codecov badge to README.md pointing at the main branch report.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
.github/workflows/ci.yml Collects coverage during tests and uploads results to Codecov.
README.md Adds Codecov badge for visibility of coverage status on main.

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

Comment thread .github/workflows/ci.yml Outdated
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@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.

ℹ️ You can also turn on project coverage checks and project coverage reporting on Pull Request comment

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

@dex3r dex3r merged commit 934acfa into main Mar 1, 2026
1 check passed
@dex3r dex3r deleted the copilot/add-test-code-coverage branch March 1, 2026 15:34
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.

Add a test code coverage

4 participants