diff options
author | 杨宇千 <crupest@outlook.com> | 2019-08-05 17:02:07 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-05 17:02:07 +0800 |
commit | 5f5458518df0475fa36af754cae52eb31eb92fa3 (patch) | |
tree | 32cc9ef63529532515f737930e307c366c729ca3 /CI/build-pipeline.yml | |
parent | b1fa31027706f7c0e31970089e8145dc70d48e6d (diff) | |
parent | aab0531a6c9e6b4149a917029088989c5c78b68f (diff) | |
download | timeline-5f5458518df0475fa36af754cae52eb31eb92fa3.tar.gz timeline-5f5458518df0475fa36af754cae52eb31eb92fa3.tar.bz2 timeline-5f5458518df0475fa36af754cae52eb31eb92fa3.zip |
Merge pull request #37 from crupest/code-coverage
Add code coverage.
Diffstat (limited to 'CI/build-pipeline.yml')
-rw-r--r-- | CI/build-pipeline.yml | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/CI/build-pipeline.yml b/CI/build-pipeline.yml index c515f181..2c15e301 100644 --- a/CI/build-pipeline.yml +++ b/CI/build-pipeline.yml @@ -9,12 +9,17 @@ pool: vmImage: 'Ubuntu-16.04'
steps:
+- task: UseDotNet@2
+ inputs:
+ packageType: sdk
+ version: 2.2.x
+
- script: |
dotnet restore Timeline/Timeline.csproj --configfile nuget.config
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 +27,9 @@ steps: inputs:
testRunner: VSTest
testResultsFiles: '**/*.trx'
+
+- task: PublishCodeCoverageResults@1
+ condition: succeededOrFailed()
+ inputs:
+ codeCoverageTool: 'Cobertura'
+ summaryFileLocation: '**/TestResults/*/coverage.cobertura.xml'
|