This repository has been archived by the owner on Jun 23, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
50 lines (39 loc) · 1.65 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
name: OffTheRecord-CI
trigger:
- master
pool:
vmImage: 'ubuntu-latest'
variables:
buildConfiguration: 'Release'
steps:
- script: dotnet build OffTheRecord/OffTheRecord.sln --configuration $(buildConfiguration)
displayName: 'dotnet build $(buildConfiguration)'
- script: dotnet test OffTheRecord/OffTheRecord.sln --logger "trx;LogFileName=testresults.trx" --collect:"XPlat Code Coverage" --settings "OffTheRecord/coverlet.runsettings"
displayName: 'Running Tests and Code Coverage'
- task: DotNetCoreCLI@2
inputs:
command: custom
custom: tool
arguments: install --tool-path $(Build.SourcesDirectory) dotnet-reportgenerator-globaltool
displayName: Install ReportGenerator tool
- task: DotNetCoreCLI@2
inputs:
command: custom
custom: tool
arguments: install --tool-path $(Build.SourcesDirectory) coveralls.netcore --version 2.1.0
displayName: Install Coveralls.netcore tool
- script: $(Build.SourcesDirectory)/reportgenerator -reports:$(Build.SourcesDirectory)/**/coverage.cobertura.xml -targetdir:$(Build.SourcesDirectory)/coverlet/reports -reporttypes:"Cobertura"
displayName: Create reports
- script: $(Build.SourcesDirectory)/coveralls.net $(Build.SourcesDirectory) -f *opencover.xml --recursive -r $(COVERALLIO)
displayName: Send code coverage to Coveralls.io
- task: PublishCodeCoverageResults@1
displayName: 'Publish code coverage'
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: $(Build.SourcesDirectory)/coverlet/reports/Cobertura.xml
- task: PublishTestResults@2
displayName: 'Publish test results'
inputs:
testRunner: VSTest
testResultsFiles: '**/*.trx'
failTaskOnFailedTests: true