Skip to content

Commit 28aad5f

Browse files
fix path for building solution
1 parent 6a773a2 commit 28aad5f

File tree

1 file changed

+28
-2
lines changed

1 file changed

+28
-2
lines changed

.github/workflows/build.yml

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,34 @@ jobs:
1111
- name: Checkout code
1212
uses: actions/checkout@v4
1313

14+
- name: Setup .NET
15+
uses: actions/setup-dotnet@v3
16+
with:
17+
dotnet-version: '8.0.x'
18+
1419
- name: Build project
20+
working-directory: src
1521
run: dotnet build --configuration Release
1622

17-
- name: Run tests
18-
run: dotnet test --configuration Release
23+
- name: Run tests with coverage
24+
working-directory: src
25+
run: dotnet test --configuration Release --collect:"XPlat Code Coverage" --results-directory ./coverage
26+
27+
- name: Generate coverage report
28+
uses: danielpalme/[email protected]
29+
with:
30+
reports: 'coverage/**/coverage.cobertura.xml'
31+
targetdir: 'coverage-report'
32+
reporttypes: 'Html;Cobertura'
33+
34+
- name: Upload coverage to Codecov
35+
uses: codecov/codecov-action@v3
36+
with:
37+
files: ./coverage/**/coverage.cobertura.xml
38+
fail_ci_if_error: false
39+
40+
- name: Publish coverage report as artifact
41+
uses: actions/upload-artifact@v3
42+
with:
43+
name: coverage-report
44+
path: coverage-report/

0 commit comments

Comments
 (0)