aboutsummaryrefslogtreecommitdiff
path: root/CI
diff options
context:
space:
mode:
author杨宇千 <crupest@outlook.com>2019-08-05 00:40:05 +0800
committer杨宇千 <crupest@outlook.com>2019-08-05 00:40:05 +0800
commit86e9d577c22c55892f848130b6a448eb5ab31ece (patch)
treecfb6bf0f94d115244d800edaa7d841b11fd1f6b7 /CI
parentb1fa31027706f7c0e31970089e8145dc70d48e6d (diff)
downloadtimeline-86e9d577c22c55892f848130b6a448eb5ab31ece.tar.gz
timeline-86e9d577c22c55892f848130b6a448eb5ab31ece.tar.bz2
timeline-86e9d577c22c55892f848130b6a448eb5ab31ece.zip
Add code coverage.
Diffstat (limited to 'CI')
-rw-r--r--CI/build-pipeline.yml8
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'