-
Notifications
You must be signed in to change notification settings - Fork 3
53 lines (40 loc) · 1.37 KB
/
localtool.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: .NET Core - Coverlet - Local tool
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.x
- name: Restore local tools
run: dotnet tool restore
- name: Build with dotnet
run: dotnet build
working-directory: BusinessTest_NetCore
- name: Run tests with coverage
run: dotnet test --no-build --collect:"XPlat Code Coverage"
working-directory: BusinessTest_NetCore
- name: Restore coverage history
uses: dawidd6/action-download-artifact@v6
with:
name: CoverageHistory
path: CoverageHistory
continue-on-error: true
- name: Create coverage report
run: dotnet reportgenerator "-reports:*Test*/TestResults/*/coverage.cobertura.xml" "-targetdir:CoverageReports" "-historydir:CoverageHistory" "-reporttypes:Html;Cobertura;MarkdownSummaryGithub"
- name: 'Publish coverage summary'
run: cat CoverageReports/SummaryGithub.md >> $GITHUB_STEP_SUMMARY
shell: bash
- name: Upload coverage report
uses: actions/upload-artifact@v4
with:
name: CoverageReports
path: CoverageReports
- name: Upload coverage history
uses: actions/upload-artifact@v4
with:
name: CoverageHistory
path: CoverageHistory