-
Notifications
You must be signed in to change notification settings - Fork 3
/
azure-pipelines.yml
68 lines (59 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# 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
- refs/tags/*
- feature/*
pr:
autoCancel: true
branches:
include:
- master
paths:
include:
- src/*
- tests/*
pool:
vmImage: 'windows-latest'
variables:
buildConfiguration: 'Release'
steps:
- task: UseDotNet@2
inputs:
installationPath: "$(Build.SourcesDirectory)/.tmp/dotnet-win"
packageType: 'sdk'
useGlobalJson: true
#https://github.com/dotnet/cli/issues/6589
- task: PowerShell@2
displayName: 'Run CI'
inputs:
targetType: filePath
filePath: Build.ps1
arguments: -target CI
failOnStderr: true
workingDirectory: $(Build.SourcesDirectory)
env:
DOTNET_MSBUILD_SDK_RESOLVER_CLI_DIR: "$(Build.SourcesDirectory)/.tmp/dotnet-win"
DOTNET_MSBUILD_SDK_RESOLVER_SDKS_DIR: "$(Build.SourcesDirectory)/.tmp/dotnet-win"
DOTNET_ROOT: "$(Build.SourcesDirectory)/.tmp/dotnet-win"
- task: PublishTestResults@2
displayName: 'Publish Test results'
inputs:
testResultsFormat: 'VSTest'
testResultsFiles: '*.trx'
searchFolder: 'artifacts/tests'
condition: always()
- task: PublishCodeCoverageResults@1
displayName: 'Publish Code Coverage'
inputs:
codeCoverageTool: cobertura
summaryFileLocation: artifacts/tests/coverage.cobertura.xml
reportDirectory: artifacts/tests/Reports
failIfCoverageEmpty: true
- task: PublishBuildArtifacts@1
displayName: 'Publish Packages'
inputs:
pathtoPublish: 'artifacts/nuget'
artifactName: 'Nuget'