Skip to content

Commit 934acfa

Browse files
Copilotdex3rCopilot
authored
Add code coverage collection and Codecov badge (#39)
* Initial plan * Add code coverage collection and Codecov badge Co-authored-by: dex3r <3155725+dex3r@users.noreply.github.com> * Update .github/workflows/ci.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: dex3r <3155725+dex3r@users.noreply.github.com> Co-authored-by: Mateusz Krzaczek <dex3r@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent b3bf8c8 commit 934acfa

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,10 @@ jobs:
2323
run: dotnet restore MattSourceGenHelpers.sln
2424

2525
- name: Test
26-
run: dotnet test MattSourceGenHelpers.sln --no-restore --verbosity normal
26+
run: dotnet test MattSourceGenHelpers.sln --no-restore --verbosity normal --collect:"XPlat Code Coverage" --results-directory ./coverage
27+
28+
- name: Upload coverage to Codecov
29+
uses: codecov/codecov-action@v5
30+
with:
31+
directory: ./coverage
32+
fail_ci_if_error: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# MattSourceGenHelpers
22

3+
[![codecov](https://codecov.io/gh/dex3r/MattSourceGenHelpers/branch/main/graph/badge.svg)](https://codecov.io/gh/dex3r/MattSourceGenHelpers)
4+
35
With MattSourceGenHelpers, you can write your generator code as a normal method, in the same assembly as the output.
46
This allows you to write your generator in a more natural way, without having to deal with the complexities of Roslyn Source Generators and a separate Project.
57

0 commit comments

Comments
 (0)