diff options
author | 杨宇千 <crupest@outlook.com> | 2019-08-05 00:40:05 +0800 |
---|---|---|
committer | 杨宇千 <crupest@outlook.com> | 2019-08-05 00:40:05 +0800 |
commit | 06e279d83db60ada75392291d0c288ba7239df6d (patch) | |
tree | cfb6bf0f94d115244d800edaa7d841b11fd1f6b7 /CI | |
parent | 1f40b3363bedfaeba8ca29c9cf895432d7225305 (diff) | |
download | timeline-06e279d83db60ada75392291d0c288ba7239df6d.tar.gz timeline-06e279d83db60ada75392291d0c288ba7239df6d.tar.bz2 timeline-06e279d83db60ada75392291d0c288ba7239df6d.zip |
Add code coverage.
Diffstat (limited to 'CI')
-rw-r--r-- | CI/build-pipeline.yml | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/CI/build-pipeline.yml b/CI/build-pipeline.yml index c515f181..64a851f0 100644 --- a/CI/build-pipeline.yml +++ b/CI/build-pipeline.yml @@ -14,7 +14,7 @@ steps: dotnet restore Timeline.Tests/Timeline.Tests.csproj --configfile nuget.config
displayName: Dotnet Restore
-- script: dotnet test Timeline.Tests/Timeline.Tests.csproj --configuration $(buildConfiguration) --no-restore --logger trx
+- script: dotnet test Timeline.Tests/Timeline.Tests.csproj --configuration $(buildConfiguration) --no-restore --logger trx --collect:"XPlat Code Coverage"
displayName: Dotnet Test
- task: PublishTestResults@2
@@ -22,3 +22,9 @@ steps: inputs:
testRunner: VSTest
testResultsFiles: '**/*.trx'
+
+- task: PublishCodeCoverageResults@1
+ condition: succeededOrFailed()
+ inputs:
+ codeCoverageTool: 'Cobertura'
+ summaryFileLocation: '**/coverage.cobertura.xml'
|