CI/CD Guide
Coverlet + GitHub Actions
Automating your code coverage is the most effective way to prevent technical debt. This guide shows you how to integrate Coverlet into your GitHub Actions workflows in under 5 minutes.
Basic Workflow Example
Add this step to your .github/workflows/main.yml file to generate coverage during every push or pull request:
- name: Test with Coverlet run: dotnet test --collect:"XPlat Code Coverage" - name: Upload coverage to Codecov uses: codecov/codecov-action@v3 with: files: ./**/coverage.cobertura.xml
Why GitHub Actions & Coverlet?
By combining Coverlet with GitHub Actions, you can ensure that every single PR is vetted for quality. Most open-source projects use this exact combination to maintain high standards across distributed teams.
Tip: Use the
XPlat Code Coverage collector to ensure your reports are generated in the Cobertura format, which is universally accepted by tools like Codecov and SonarCloud.