-
Notifications
You must be signed in to change notification settings - Fork 12
/
azure-pipelines.yml
137 lines (118 loc) · 3.56 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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
trigger:
- main
pool:
vmImage: 'windows-2022'
variables:
solution: '**/*.sln'
buildPlatform: 'Any CPU'
buildConfiguration: 'Release'
steps:
- task: UseDotNet@2
displayName: 'Use .NET Core SDK 6.0.x'
inputs:
version: 6.0.x
- task: UseDotNet@2
displayName: 'Use .NET Core SDK 7.0.x'
inputs:
version: 7.0.x
- task: UseDotNet@2
displayName: 'Use .NET Core SDK 8.0.x'
inputs:
version: 8.0.x
- task: DotNetCoreCLI@2
displayName: 'dotnet restore'
inputs:
command: restore
- task: PowerShell@2
displayName: 'Build Connectors'
inputs:
targetType: 'inline'
script: |
cd .\Connectors
.\build.ps1 $(buildConfiguration)
- task: VSBuild@1
displayName: 'Build Solution'
inputs:
solution: '$(solution)'
msbuildArgs: '/p:DeployExtension=false /p:AppInsightsInstrumentationKey=$(AppInsightsInstrumentationKey) /nowarn:VSTHRD010'
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
- task: NuGetCommand@2
displayName: 'Install nuget packages'
inputs:
command: 'custom'
arguments: 'install .\Tests\ExternalPackages\PackagesForTests\Packages.config'
- task: DotNetCoreCLI@2
displayName: Run Unit Tests
inputs:
command: test
projects: '**/SpecFlow.VisualStudio.Tests/*.csproj'
arguments: '--configuration $(BuildConfiguration) --no-build --collect "Code coverage"'
testRunTitle: Unit Tests
publishTestResults: true
- task: DotNetCoreCLI@2
displayName: Run Connector Tests
inputs:
command: test
projects: '**/*Connector**Tests/*.csproj'
arguments: '--configuration $(BuildConfiguration) --no-build'
testRunTitle: Connector Tests
condition: succeededOrFailed()
- task: DotNetCoreCLI@2
displayName: Run SpecFlow Scenarios
inputs:
command: test
projects: '**/*[Ss]pecs/*.csproj'
arguments: '--configuration $(BuildConfiguration) --runtime win-x64'
testRunTitle: 'Deveroom Specs'
condition: succeededOrFailed()
- task: CopyFiles@2
displayName: 'Copy dlls and changelog'
inputs:
SourceFolder: '$(system.defaultworkingdirectory)'
Contents: |
**\bin\$(buildConfiguration)\**
Changelog.md
TargetFolder: '$(build.artifactstagingdirectory)\drop'
condition: succeededOrFailed()
- task: CopyFiles@2
displayName: 'Copy marketplace scripts'
inputs:
SourceFolder: '$(system.defaultworkingdirectory)'
Contents: |
publish*.ps1
.marketplace\**
TargetFolder: '$(build.artifactstagingdirectory)\marketplace'
condition: succeededOrFailed()
- task: CopyFiles@2
displayName: 'Copy NuGet folder'
inputs:
SourceFolder: 'd:\a\1\Nuget'
Contents: '**'
TargetFolder: '$(build.artifactstagingdirectory)\drop\NuGet'
condition: succeededOrFailed()
- task: CopyFiles@2
displayName: 'Copy VSIX'
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: marketplace'
inputs:
PathtoPublish: '$(build.artifactstagingdirectory)\marketplace'
ArtifactName: marketplace
condition: succeededOrFailed()
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: vsix'
inputs:
PathtoPublish: '$(build.artifactstagingdirectory)\vsix'
ArtifactName: vsix
condition: succeededOrFailed()