-
Notifications
You must be signed in to change notification settings - Fork 6
/
azure-pipelines.yml
95 lines (81 loc) · 2.32 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
trigger:
- master
pool:
vmImage: 'windows-2019'
variables:
solution: '**/*.sln'
buildPlatform: 'Any CPU'
buildConfiguration: 'Debug'
steps:
- task: NuGetToolInstaller@0
- task: UseDotNet@2
displayName: 'Use .Net Core sdk 3.x'
inputs:
version: 3.x
- task: UseDotNet@2
displayName: 'Use .Net 5 sdk'
inputs:
version: 5.x
- task: DotNetCoreCLI@2
displayName: 'dotnet restore (with NuGet.config)'
inputs:
command: restore
feedsToUse: config
nugetConfigPath: NuGet.config
- task: VSBuild@1
displayName: 'Build Solution'
inputs:
solution: '$(solution)'
msbuildArgs: '/p:DeployExtension=false /nowarn:VSTHRD010'
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
- task: VSTest@2
displayName: 'Run Unit Tests'
inputs:
testAssemblyVer2: |
**\$(buildConfiguration)\**\*tests*.dll
!**\obj\**
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
- task: VSTest@2
displayName: 'Run SpecFlow Scenarios'
inputs:
testAssemblyVer2: |
**\$(buildConfiguration)\**\*specs*.dll
!**\obj\**
testFiltercriteria: '$(specsFilterCriteria)'
otherConsoleOptions: '/platform:x64'
testRunTitle: 'Deveroom Specs'
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
rerunFailedTests: true
- task: CopyFiles@2
inputs:
SourceFolder: '$(system.defaultworkingdirectory)'
Contents: '**\bin\$(buildConfiguration)\**'
TargetFolder: '$(build.artifactstagingdirectory)\drop'
condition: succeededOrFailed()
- task: CopyFiles@2
inputs:
SourceFolder: 'd:\a\1\Nuget'
Contents: '**'
TargetFolder: '$(build.artifactstagingdirectory)\drop\NuGet'
condition: succeededOrFailed()
- task: CopyFiles@2
inputs:
SourceFolder: '$(system.defaultworkingdirectory)'
Contents: '**\bin\$(buildConfiguration)\**\*.vsix'
TargetFolder: '$(build.artifactstagingdirectory)\vsix'
flattenFolders: true
condition: succeededOrFailed()
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: drop'
inputs:
PathtoPublish: '$(build.artifactstagingdirectory)\drop'
condition: succeededOrFailed()
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: vsix'
inputs:
PathtoPublish: '$(build.artifactstagingdirectory)\vsix'
ArtifactName: vsix
condition: succeededOrFailed()