-
Notifications
You must be signed in to change notification settings - Fork 44
/
.azure-pipelines.yml
85 lines (77 loc) · 2.14 KB
/
.azure-pipelines.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# https://aka.ms/yaml
trigger:
- master
jobs:
- job: Build
displayName: Build
continueOnError: "true"
timeoutInMinutes: 5
variables:
buildFramework: net7.0
strategy:
matrix:
"Linux 7.0 Debug":
sdkVersion: 7.0.x
config: Debug
imageName: ubuntu-latest
framework: $(buildFramework)
"Linux 7.0 Release":
sdkVersion: 7.0.x
config: Release
imageName: ubuntu-latest
framework: $(buildFramework)
"MacOS 7.0 Debug":
sdkVersion: 7.0.x
config: Debug
imageName: macOS-latest
framework: $(buildFramework)
"MacOS 7.0 Release":
sdkVersion: 7.0.x
config: Release
imageName: macOS-latest
framework: $(buildFramework)
"Windows 7.0 Debug":
sdkVersion: 7.0.x
config: Debug
imageName: windows-latest
framework: $(buildFramework)
"Windows 7.0 Release":
sdkVersion: 7.0.x
config: Release
imageName: windows-latest
framework: $(buildFramework)
pool:
vmImage: $(imageName)
steps:
- task: UseDotNet@2
displayName: Install .NET SDK $(sdkVersion)
inputs:
version: $(sdkVersion)
- bash: ./coverage.sh "$(framework)" "$(config)"
displayName: Test Coverage
- task: PublishTestResults@2
displayName: Publish test results
inputs:
testResultsFormat: VSTest
testResultsFiles: "**/*.trx"
failTaskOnFailedTests: true
buildConfiguration: $(config)
publishRunAttachments: true
- task: PublishCodeCoverageResults@1
displayName: Publish code coverage
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: ./test/TestResults/output/coverage.$(framework).cobertura.xml
- task: BuildQualityChecks@8
displayName: Check code coverage levels
inputs:
showStatistics: true
checkCoverage: true
coverageFailOption: build
coverageType: branches
buildConfiguration: $(config)
allowCoverageVariance: false
coverageDeltaType: percentage
coveragePrecision: 2
includePartiallySucceeded: false
baseBranchRef: refs/heads/master