Skip to content

Conversation

@konard
Copy link
Member

@konard konard commented Sep 13, 2025

Summary

  • ✅ Enable code coverage monitoring for tests using Codacy Coverage Reporter
  • ✅ Integrate with existing coverlet.collector package for coverage data collection
  • ✅ Add automated coverage reporting to GitHub Actions CI workflow

Implementation Details

Coverage Collection

  • Modified the existing test job in .github/workflows/csharp.yml to collect coverage data
  • Added --collect:"XPlat Code Coverage" flag to dotnet test command
  • Uses the existing coverlet.collector package already included in the test project

Coverage Reporting

  • Added Codacy Coverage Reporter GitHub Action step
  • Automatically uploads coverage reports in Cobertura XML format to Codacy
  • Integrated with the project's existing Codacy setup (visible in README badges)

Configuration Required

The repository owner will need to add CODACY_PROJECT_TOKEN as a GitHub secret to enable the coverage reporting. This token can be obtained from:
https://app.codacy.com/manual/drakonard/Ranges/settings/coverage

Test Results

  • ✅ Local testing confirms coverage collection works correctly
  • ✅ Generated coverage report shows ~42% line coverage and ~67% branch coverage
  • ✅ All 7 tests continue to pass

🤖 Generated with Claude Code


Resolves #36

Adding CLAUDE.md with task information for AI processing.
This file will be removed when the task is complete.

Issue: #36
@konard konard self-assigned this Sep 13, 2025
- Added --collect:"XPlat Code Coverage" flag to dotnet test command to generate coverage reports using coverlet.collector
- Added Codacy Coverage Reporter action step to automatically upload coverage data to Codacy
- Uses existing coverlet.collector package that is already included in the test project
- Coverage reports will be generated in Cobertura XML format and uploaded to Codacy for tracking

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@konard konard changed the title [WIP] Enable test's code coverage monitoring Enable test's code coverage monitoring Sep 13, 2025
@konard konard marked this pull request as ready for review September 13, 2025 21:39
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.

Enable test's code coverage monitoring

2 participants