-
Notifications
You must be signed in to change notification settings - Fork 18
/
azure-pipelines.yml
76 lines (67 loc) · 1.83 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
69
70
71
72
73
74
75
76
trigger:
- master
pool:
vmImage: 'windows-latest'
variables:
solution: '**/*.sln'
buildPlatform: 'Any CPU'
buildConfiguration: 'Release'
dotNetVersion: '3.1.x'
steps:
- task: UseDotNet@2
displayName: Install Dot Net Core v$(dotNetVersion)
inputs:
version: $(dotNetVersion)
- task: DotNetCoreCLI@2
displayName: 'Restore NuGet'
inputs:
command: 'restore'
projects: '$(solution)'
env:
COREHOST_TRACE: 0
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
DOTNET_CLI_TELEMETRY_OPTOUT: 1
- task: DotNetCoreCLI@2
inputs:
command: custom
custom: tool
arguments: install --tool-path . nbgv
displayName: Install NBGV tool
env:
COREHOST_TRACE: 0
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
DOTNET_CLI_TELEMETRY_OPTOUT: 1
- script: nbgv cloud
displayName: Set Version
env:
COREHOST_TRACE: 0
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
DOTNET_CLI_TELEMETRY_OPTOUT: 1
- task: MSBuild@1
displayName: Build Solutions
inputs:
solution: '$(solution)'
msbuildArguments: /t:build;pack /p:NoPackageAnalysis=true /p:PackageOutputPath=$(Build.ArtifactStagingDirectory)\artifacts /v:m
configuration: $(BuildConfiguration)
maximumCpuCount: true
env:
COREHOST_TRACE: 0
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
DOTNET_CLI_TELEMETRY_OPTOUT: 1
- task: DotNetCoreCLI@2
displayName: Run Unit Tests
inputs:
command: test
projects: '**/*Tests/*.csproj'
arguments: '--configuration $(buildConfiguration) --logger:"console;verbosity=detailed"'
env:
COREHOST_TRACE: 0
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
DOTNET_CLI_TELEMETRY_OPTOUT: 1
- task: PublishBuildArtifacts@1
displayName: Publish Build Artifacts
inputs:
PathtoPublish: $(Build.ArtifactStagingDirectory)\artifacts
ArtifactName: artifacts
publishLocation: Container
condition: always()