-
Notifications
You must be signed in to change notification settings - Fork 1
/
azure-pipelines.yml
30 lines (27 loc) · 1.11 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
trigger:
branches:
include:
- '*'
pool:
vmImage: 'VS2017-Win2016'
variables:
buildConfiguration: 'Release'
steps:
- script: dotnet build --configuration $(buildConfiguration)
- script: |
mkdir $(Build.SourcesDirectory)\results
dotnet tool install --global coverlet.console
dotnet test --logger trx /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura FakeApiTest\FakeApiTest.csproj /p:Exclude=\"[FakeApiTest]*"
copy $(Build.SourcesDirectory)\FakeApiTest\coverage.cobertura.xml $(Build.SourcesDirectory)\results
dotnet tool install dotnet-reportgenerator-globaltool --tool-path . --version 4.0.0-rc4
.\reportgenerator "-reports:$(Build.SourcesDirectory)\FakeApiTest\coverage.cobertura.xml" "-targetdir:results" "-reporttypes:HTMLInline;HTMLChart"
displayName: 'Unit testing'
- task: PublishTestResults@2
inputs:
testRunner: VSTest
testResultsFiles: '**/*.trx'
- task: PublishCodeCoverageResults@1
inputs:
summaryFileLocation: $(Build.SourcesDirectory)\results\coverage.cobertura.xml
reportDirectory: $(Build.SourcesDirectory)\results
codecoverageTool: cobertura