Created
July 8, 2020 12:25
-
-
Save samlucax/c6e226adcee43eaf56048fae88bd3ebd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pool: | |
name: Azure Pipelines | |
#Your build pipeline references the ‘BuildConfiguration’ variable, which you’ve selected to be settable at queue time. Create or edit the build pipeline for this YAML file, define the variable on the Variables tab, and then select the option to make it settable at queue time. See https://go.microsoft.com/fwlink/?linkid=865971 | |
#Your build pipeline references the ‘BuildConfiguration’ variable, which you’ve selected to be settable at queue time. Create or edit the build pipeline for this YAML file, define the variable on the Variables tab, and then select the option to make it settable at queue time. See https://go.microsoft.com/fwlink/?linkid=865971 | |
steps: | |
- task: DotNetCoreCLI@2 | |
displayName: Restore | |
inputs: | |
command: restore | |
projects: '**/<NomeDoSeuProjeto>/*.csproj' | |
- task: DotNetCoreCLI@2 | |
displayName: Build | |
inputs: | |
projects: '**/<NomeDoSeuProjeto>/*.csproj' | |
- task: DotNetCoreCLI@2 | |
displayName: 'Unit tests' | |
inputs: | |
command: test | |
projects: '**/<NomeDoSeuProjeto>.UnitTests.csproj' | |
arguments: '--configuration $(BuildConfiguration) --collect "XPlat Code coverage" -- RunConfiguration.DisableAppDomain=true' | |
continueOnError: true | |
- task: DotNetCoreCLI@2 | |
displayName: 'Funcional tests' | |
inputs: | |
command: test | |
projects: '**/<NomeDoSeuProjeto>.Tests.csproj' | |
arguments: '--configuration $(BuildConfiguration) --collect "XPlat Code coverage"' | |
continueOnError: true | |
- script: 'dotnet tool install --global dotnet-reportgenerator-globaltool --version 4.5.8' | |
displayName: 'Install ReportGenerator tool' | |
- script: 'reportgenerator -reports:$(Agent.TempDirectory)/**/coverage.cobertura.xml -targetdir:$(Build.SourcesDirectory)/coverlet/reports -reporttypes:"Cobertura"' | |
displayName: 'Create reports' | |
- task: PublishCodeCoverageResults@1 | |
displayName: 'Publish code coverage from $(Build.SourcesDirectory)/coverlet/reports/Cobertura.xml' | |
inputs: | |
codeCoverageTool: Cobertura | |
summaryFileLocation: '$(Build.SourcesDirectory)/coverlet/reports/Cobertura.xml' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment