File tree Expand file tree Collapse file tree 1 file changed +16
-14
lines changed Expand file tree Collapse file tree 1 file changed +16
-14
lines changed Original file line number Diff line number Diff line change @@ -175,6 +175,17 @@ else
175
175
176
176
$pesterPassThruObject = Start-PSPester @pesterParam
177
177
178
+ # Determine whether the build passed
179
+ try {
180
+ # this throws if there was an error
181
+ Test-PSPesterResults - ResultObject $pesterPassThruObject
182
+ $result = " PASS"
183
+ }
184
+ catch {
185
+ $resultError = $_
186
+ $result = " FAIL"
187
+ }
188
+
178
189
if (-not $isPr ) {
179
190
# Run 'CrossGen' for push commit, so that we can generate package.
180
191
# It won't rebuild powershell, but only CrossGen the already built assemblies.
@@ -203,16 +214,6 @@ else
203
214
}
204
215
}
205
216
206
- # Determine whether the build passed
207
- try {
208
- # this throws if there was an error
209
- Test-PSPesterResults - ResultObject $pesterPassThruObject
210
- $result = " PASS"
211
- }
212
- catch {
213
- $resultError = $_
214
- $result = " FAIL"
215
- }
216
217
# update the badge if you've done a cron build, these are not fatal issues
217
218
if ( $cronBuild ) {
218
219
try {
@@ -229,10 +230,11 @@ else
229
230
Write-Warning " Could not update status badge: $_ "
230
231
}
231
232
}
232
- # if the tests did not pass, throw the reason why
233
- if ( $result -eq " FAIL" ) {
234
- Throw $resultError
235
- }
233
+ }
234
+
235
+ # if the tests did not pass, throw the reason why
236
+ if ( $result -eq " FAIL" ) {
237
+ Throw $resultError
236
238
}
237
239
238
240
Start-PSxUnit
You can’t perform that action at this time.
0 commit comments