-
Notifications
You must be signed in to change notification settings - Fork 1
/
azure-pipelines.yml
44 lines (40 loc) · 1.64 KB
/
azure-pipelines.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# ASP.NET Core
# Build and test ASP.NET Core projects targeting .NET Core.
# Add steps that run tests, create a NuGet package, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/dotnet-core
trigger:
- master
pool:
vmImage: 'windows-latest'
variables:
buildConfiguration: 'Release'
steps:
- powershell: |
$env:CORE_SDK_VERSION = '5.0.100-preview.4.20258.7'
Write-Host "Installing .NET Core SDK $env:CORE_SDK_VERSION"
Invoke-WebRequest -Uri 'https://dot.net/v1/dotnet-install.ps1' -UseBasicParsing -OutFile "$env:temp\dotnet-install.ps1"
& $env:temp\dotnet-install.ps1 -Architecture x64 -Version $env:CORE_SDK_VERSION -InstallDir "$env:ProgramFiles\dotnet"
displayName: 'Installing .NET 5 Preview SDK'
- task: NuGetAuthenticate@0
- task: DotNetCoreCLI@2
inputs:
command: 'restore'
projects: specs\LogoFX.Cli.Dotnet.Specs.sln
includeNuGetOrg: true
displayName: 'Restoring code using dotnet restore'
- script: dotnet build specs\LogoFX.Cli.Dotnet.Specs.sln --configuration $(buildConfiguration)
displayName: 'Building code using $(buildConfiguration) configuration'
- script: dotnet test specs\LogoFX.Cli.Dotnet.Specs.sln --configuration $(buildConfiguration) --logger trx
displayName: 'Testing code using $(buildConfiguration) configuration'
- task: SpecFlowPlus@0
inputs:
projectFilePath: 'specs\LogoFX.Cli.Dotnet.Specs.Features'
projectName: 'specs\LogoFX.Cli.Dotnet.Specs.sln'
projectLanguage: 'en'
- task: PublishTestResults@2
condition: succeededOrFailed()
inputs:
testResultsFormat: 'VSTest'
testResultsFiles: '**/*.trx'
mergeTestResults: true
failTaskOnFailedTests: true