41 строка
1.7 KiB
YAML
41 строка
1.7 KiB
YAML
jobs:
|
|
- job: Linux
|
|
pool:
|
|
vmImage: 'ubuntu 16.04'
|
|
variables:
|
|
buildConfiguration: 'Release'
|
|
steps:
|
|
- script: dotnet build --configuration $(buildConfiguration) $(Build.SourcesDirectory)/Camelotia.Presentation.Avalonia/Camelotia.Presentation.Avalonia.csproj
|
|
displayName: 'Linux Build'
|
|
- script: dotnet test --logger trx Camelotia.Presentation.Tests
|
|
displayName: 'Linux Unit Tests'
|
|
- task: PublishTestResults@2
|
|
inputs:
|
|
testRunner: VSTest
|
|
testResultsFiles: '**/*.trx'
|
|
|
|
- job: Windows
|
|
pool:
|
|
vmImage: 'vs2017-win2016'
|
|
variables:
|
|
buildConfiguration: 'Release'
|
|
steps:
|
|
- script: dotnet build --configuration $(buildConfiguration) $(Build.SourcesDirectory)/Camelotia.Presentation.Avalonia/Camelotia.Presentation.Avalonia.csproj
|
|
displayName: 'Windows Build'
|
|
- script: |
|
|
mkdir $(Build.SourcesDirectory)\results
|
|
dotnet test --logger trx /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura Camelotia.Presentation.Tests
|
|
copy $(Build.SourcesDirectory)\Camelotia.Presentation.Tests\coverage.cobertura.xml $(Build.SourcesDirectory)\results
|
|
dotnet tool install dotnet-reportgenerator-globaltool --tool-path . --version 4.0.0-rc4
|
|
reportgenerator "-reports:$(Build.SourcesDirectory)\results\coverage.cobertura.xml" "-targetdir:results" "-reporttypes:HTMLInline;HTMLChart"
|
|
displayName: 'Windows Unit Tests'
|
|
- 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
|