@@ -54,14 +54,15 @@ stages:
5454 publishLocation : ' pipeline'
5555 parallel : true
5656
57- - stage : Test
57+ - stage : Quality_Test_and_Unit_Test
58+ displayName : ' Quality Test and Unit Test'
5859 dependsOn : Build
5960 jobs :
6061 - job : Test_HQRM
6162 displayName : ' HQRM'
6263 pool :
6364 vmImage : ' windows-latest'
64- timeoutInMinutes : 0
65+ timeoutInMinutes : ' 0 '
6566 steps :
6667 - task : DownloadPipelineArtifact@2
6768 displayName : ' Download Pipeline Artifact'
@@ -86,11 +87,19 @@ stages:
8687 testRunTitle : ' HQRM'
8788 condition : succeededOrFailed()
8889
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'
91100 pool :
92- vmImage : ' windows-2019 '
93- timeoutInMinutes : 0
101+ vmImage : $(vmImage)
102+ timeoutInMinutes : ' 0 '
94103 steps :
95104 - task : DownloadPipelineArtifact@2
96105 displayName : ' Download Pipeline Artifact'
@@ -112,22 +121,21 @@ stages:
112121 inputs :
113122 testResultsFormat : ' NUnit'
114123 testResultsFiles : ' $(buildFolderName)/$(testResultFolderName)/NUnit*.xml'
115- testRunTitle : ' Unit (Windows Server 2019 )'
124+ testRunTitle : ' Unit $(vmImage )'
116125 condition : succeededOrFailed()
117126
118127 - task : PublishPipelineArtifact@1
119128 displayName : ' Publish Test Artifact'
120129 inputs :
121130 targetPath : ' $(buildFolderName)/$(testResultFolderName)/'
122- artifactName : $(testArtifactName)
123- parallel : true
131+ artifactName : ' $(testArtifactName)_$(vmImage)'
124132
125133 - job : Code_Coverage
126134 displayName : ' Publish Code Coverage'
127- dependsOn : Test_Unit_2019
135+ dependsOn : Test_Unit
128136 pool :
129137 vmImage : ' ubuntu-latest'
130- timeoutInMinutes : 0
138+ timeoutInMinutes : ' 0 '
131139 steps :
132140 - task : DownloadPipelineArtifact@2
133141 displayName : ' Download Pipeline Artifact'
@@ -140,9 +148,16 @@ stages:
140148 displayName : ' Download Test Artifact'
141149 inputs :
142150 buildType : ' current'
143- artifactName : $(testArtifactName)
144151 targetPath : ' $(Build.SourcesDirectory)/$(buildFolderName)/$(testResultFolderName)'
145152
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+
146161 - task : PublishCodeCoverageResults@1
147162 displayName : ' Publish Code Coverage to Azure DevOps'
148163 inputs :
@@ -154,77 +169,23 @@ stages:
154169 bash <(curl -s https://codecov.io/bash) -f "./$(buildFolderName)/$(testResultFolderName)/JaCoCo_coverage.xml"
155170 displayName: 'Publish Code Coverage to Codecov.io'
156171
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'
225186 pool :
226- vmImage : ' windows-2022 '
227- timeoutInMinutes : 0
187+ vmImage : $(vmImage)
188+ timeoutInMinutes : ' 0 '
228189 steps :
229190 - task : DownloadPipelineArtifact@2
230191 displayName : ' Download Pipeline Artifact'
@@ -254,11 +215,13 @@ stages:
254215 inputs :
255216 testResultsFormat : ' NUnit'
256217 testResultsFiles : ' $(buildFolderName)/$(testResultFolderName)/NUnit*.xml'
257- testRunTitle : ' Integration (Windows Server 2022 )'
218+ testRunTitle : ' Integration $(testRunTitle )'
258219 condition : succeededOrFailed()
259220
260221 - stage : Deploy
261- dependsOn : Test
222+ dependsOn :
223+ - Quality_Test_and_Unit_Test
224+ - Integration_Test
262225 condition : |
263226 and(
264227 succeeded(),
0 commit comments