Skip to content

Commit 713d616

Browse files
committed
Add code coverage for unit and integration tests
1 parent 4e40478 commit 713d616

6 files changed

Lines changed: 62 additions & 375 deletions

File tree

.github/workflows/dotnet.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build
1+
name: Build and test
22

33
on:
44
push:
@@ -27,14 +27,22 @@ jobs:
2727
run: dotnet clean
2828

2929
- name: Build
30-
run: dotnet build --no-restore
30+
run: dotnet build -c Release --no-restore
3131

3232
- name: Run unit tests
33-
run: dotnet test Monero.UnitTests/Monero.UnitTests.csproj --no-build --logger:trx
33+
run: |
34+
dotnet tool install --global JetBrains.dotCover.CommandLineTools --version 2025.1.6
35+
dotCover cover-dotnet --TargetArguments="test Monero.UnitTests/Monero.UnitTests.csproj -c Release --no-build" --output=coverage/dotCover.UnitTests.output.dcvr
3436
3537
- name: Run integration tests
3638
run: docker compose -f Monero.IntegrationTests/docker-compose.yml run tests
3739

3840
- name: Cleanup Docker containers
3941
if: always()
4042
run: docker compose -f Monero.IntegrationTests/docker-compose.yml down -v
43+
44+
- name: Upload coverage report
45+
uses: actions/upload-artifact@v4
46+
with:
47+
name: coverage-report
48+
path: coverage/dotcover.xml

0 commit comments

Comments
 (0)