forked from open-telemetry/opentelemetry-dotnet
-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (43 loc) · 1.51 KB
/
code-coverage.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
54
55
name: Code Coverage
on:
push:
branches: [ main, metrics ]
paths-ignore:
- '**.md'
pull_request:
branches: [ main, metrics ]
paths-ignore:
- '**.md'
jobs:
build-test-report:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-latest]
env:
OS: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0 # fetching all
- name: Install dependencies
run: dotnet restore
- name: dotnet build
run: dotnet build --configuration Release --no-restore
# - name: dotnet test
# run: dotnet test --collect:"XPlat Code Coverage" --results-directory:"TestResults" --configuration Release --no-build -- RunConfiguration.DisableAppDomain=true
- name: dotnet test
run: dotnet test --collect:"Code Coverage" --results-directory:"TestResults" --configuration Release --no-build -- RunConfiguration.DisableAppDomain=true
- name: Process code coverage
run: .\build\process-codecoverage.ps1
shell: powershell
- name: Install report tool
run: dotnet tool install -g dotnet-reportgenerator-globaltool
- name: Merging test results
run: reportgenerator -reports:TestResults/**/*.xml -targetdir:TestResults -reporttypes:Cobertura -assemblyFilters:"-microsoft.data.sqlclient*;-grpc.core*;-opentracing*"
- uses: codecov/codecov-action@v1.0.12
with:
file: TestResults/Cobertura.xml
env_vars: OS
name: Code Coverage for ${{ matrix.os }}