@@ -54,14 +54,15 @@ stages:
54
54
publishLocation : ' pipeline'
55
55
parallel : true
56
56
57
- - stage : Test
57
+ - stage : Quality_Test_and_Unit_Test
58
+ displayName : ' Quality Test and Unit Test'
58
59
dependsOn : Build
59
60
jobs :
60
61
- job : Test_HQRM
61
62
displayName : ' HQRM'
62
63
pool :
63
64
vmImage : ' windows-latest'
64
- timeoutInMinutes : 0
65
+ timeoutInMinutes : ' 0 '
65
66
steps :
66
67
- task : DownloadPipelineArtifact@2
67
68
displayName : ' Download Pipeline Artifact'
@@ -86,11 +87,19 @@ stages:
86
87
testRunTitle : ' HQRM'
87
88
condition : succeededOrFailed()
88
89
89
- - job : Test_Unit_2019
90
- displayName : ' Unit (Windows Server 2019)'
90
+ - job : Test_Unit
91
+ displayName : ' Unit'
92
+ strategy :
93
+ matrix :
94
+ Windows Server 2019 :
95
+ vmImage : ' windows-2019'
96
+ Windows Server 2022 :
97
+ vmImage : ' windows-2022'
98
+ Windows Server 2025 :
99
+ vmImage : ' windows-2025'
91
100
pool :
92
- vmImage : ' windows-2019 '
93
- timeoutInMinutes : 0
101
+ vmImage : $(vmImage)
102
+ timeoutInMinutes : ' 0 '
94
103
steps :
95
104
- task : DownloadPipelineArtifact@2
96
105
displayName : ' Download Pipeline Artifact'
@@ -112,22 +121,21 @@ stages:
112
121
inputs :
113
122
testResultsFormat : ' NUnit'
114
123
testResultsFiles : ' $(buildFolderName)/$(testResultFolderName)/NUnit*.xml'
115
- testRunTitle : ' Unit (Windows Server 2019 )'
124
+ testRunTitle : ' Unit $(vmImage )'
116
125
condition : succeededOrFailed()
117
126
118
127
- task : PublishPipelineArtifact@1
119
128
displayName : ' Publish Test Artifact'
120
129
inputs :
121
130
targetPath : ' $(buildFolderName)/$(testResultFolderName)/'
122
- artifactName : $(testArtifactName)
123
- parallel : true
131
+ artifactName : ' $(testArtifactName)_$(vmImage)'
124
132
125
133
- job : Code_Coverage
126
134
displayName : ' Publish Code Coverage'
127
- dependsOn : Test_Unit_2019
135
+ dependsOn : Test_Unit
128
136
pool :
129
137
vmImage : ' ubuntu-latest'
130
- timeoutInMinutes : 0
138
+ timeoutInMinutes : ' 0 '
131
139
steps :
132
140
- task : DownloadPipelineArtifact@2
133
141
displayName : ' Download Pipeline Artifact'
@@ -140,9 +148,16 @@ stages:
140
148
displayName : ' Download Test Artifact'
141
149
inputs :
142
150
buildType : ' current'
143
- artifactName : $(testArtifactName)
144
151
targetPath : ' $(Build.SourcesDirectory)/$(buildFolderName)/$(testResultFolderName)'
145
152
153
+ - task : PowerShell@2
154
+ name : merge
155
+ displayName : ' Merge Code Coverage files'
156
+ inputs :
157
+ filePath : ' ./build.ps1'
158
+ arguments : ' -tasks merge'
159
+ pwsh : true
160
+
146
161
- task : PublishCodeCoverageResults@1
147
162
displayName : ' Publish Code Coverage to Azure DevOps'
148
163
inputs :
@@ -154,77 +169,23 @@ stages:
154
169
bash <(curl -s https://codecov.io/bash) -f "./$(buildFolderName)/$(testResultFolderName)/JaCoCo_coverage.xml"
155
170
displayName: 'Publish Code Coverage to Codecov.io'
156
171
157
- - job : Test_Integration_2019
158
- displayName : ' Integration (Windows Server 2019)'
159
- pool :
160
- vmImage : ' windows-2019'
161
- timeoutInMinutes : 0
162
- steps :
163
- - task : DownloadPipelineArtifact@2
164
- displayName : ' Download Pipeline Artifact'
165
- inputs :
166
- buildType : ' current'
167
- artifactName : $(buildArtifactName)
168
- targetPath : ' $(Build.SourcesDirectory)/$(buildArtifactName)'
169
-
170
- - task : PowerShell@2
171
- name : configureWinRM
172
- displayName : ' Configure WinRM'
173
- inputs :
174
- targetType : ' inline'
175
- script : ' winrm quickconfig -quiet'
176
- pwsh : false
177
-
178
- - task : PowerShell@2
179
- name : test
180
- displayName : ' Run Integration Test'
181
- inputs :
182
- filePath : ' ./build.ps1'
183
- arguments : " -Tasks test -PesterScript 'tests/Integration' -CodeCoverageThreshold 0"
184
- pwsh : false
185
-
186
- - task : PublishTestResults@2
187
- displayName : ' Publish Test Results'
188
- inputs :
189
- testResultsFormat : ' NUnit'
190
- testResultsFiles : ' $(buildFolderName)/$(testResultFolderName)/NUnit*.xml'
191
- testRunTitle : ' Integration (Windows Server 2019)'
192
- condition : succeededOrFailed()
193
-
194
- - job : Test_Unit_2022
195
- displayName : ' Unit (Windows Server 2022)'
196
- pool :
197
- vmImage : ' windows-2022'
198
- timeoutInMinutes : 0
199
- steps :
200
- - task : DownloadPipelineArtifact@2
201
- displayName : ' Download Pipeline Artifact'
202
- inputs :
203
- buildType : ' current'
204
- artifactName : $(buildArtifactName)
205
- targetPath : ' $(Build.SourcesDirectory)/$(buildArtifactName)'
206
-
207
- - task : PowerShell@2
208
- name : test
209
- displayName : ' Run Unit Test'
210
- inputs :
211
- filePath : ' ./build.ps1'
212
- arguments : " -Tasks test -PesterScript 'tests/Unit'"
213
- pwsh : true
214
-
215
- - task : PublishTestResults@2
216
- displayName : ' Publish Test Results'
217
- inputs :
218
- testResultsFormat : ' NUnit'
219
- testResultsFiles : ' $(buildFolderName)/$(testResultFolderName)/NUnit*.xml'
220
- testRunTitle : ' Unit (Windows Server 2022)'
221
- condition : succeededOrFailed()
222
-
223
- - job : Test_Integration_2022
224
- displayName : ' Integration (Windows Server 2022)'
172
+ - stage : Integration_Test
173
+ displayName : ' Integration Test'
174
+ dependsOn : Quality_Test_and_Unit_Test
175
+ jobs :
176
+ - job : Test_Integration
177
+ displayName : ' Integration'
178
+ strategy :
179
+ matrix :
180
+ Windows Server 2019 :
181
+ vmImage : ' windows-2019'
182
+ Windows Server 2022 :
183
+ vmImage : ' windows-2022'
184
+ Windows Server 2025 :
185
+ vmImage : ' windows-2025'
225
186
pool :
226
- vmImage : ' windows-2022 '
227
- timeoutInMinutes : 0
187
+ vmImage : $(vmImage)
188
+ timeoutInMinutes : ' 0 '
228
189
steps :
229
190
- task : DownloadPipelineArtifact@2
230
191
displayName : ' Download Pipeline Artifact'
@@ -254,11 +215,13 @@ stages:
254
215
inputs :
255
216
testResultsFormat : ' NUnit'
256
217
testResultsFiles : ' $(buildFolderName)/$(testResultFolderName)/NUnit*.xml'
257
- testRunTitle : ' Integration (Windows Server 2022 )'
218
+ testRunTitle : ' Integration $(testRunTitle )'
258
219
condition : succeededOrFailed()
259
220
260
221
- stage : Deploy
261
- dependsOn : Test
222
+ dependsOn :
223
+ - Quality_Test_and_Unit_Test
224
+ - Integration_Test
262
225
condition : |
263
226
and(
264
227
succeeded(),
0 commit comments