Set Tests to Always Publish
This commit is contained in:
@@ -69,7 +69,7 @@ task AnalyzeBuiltFiles CheckPSScriptAnalyzerInstalled, {
|
||||
|
||||
task FileTests CheckPesterInstalled, {
|
||||
$testResultsFile = "$BuildRoot\Tests\Public\TestResults.xml"
|
||||
$results = Invoke-Pester -Script "$BuildRoot\Tests\Public\ZertoApiWrapper.Tests.ps1" -OutputFile $testResultsFile -OutputFormat NUnitXML -EnableExit -PassThru
|
||||
$script:results = Invoke-Pester -Script "$BuildRoot\Tests\Public\ZertoApiWrapper.Tests.ps1" -OutputFile $testResultsFile -PassThru
|
||||
$FailureMessage = '{0} Unit test(s) failed. Aborting build' -f $results.FailedCount
|
||||
assert ($results.FailedCount -eq 0) $FailureMessage
|
||||
}
|
||||
|
||||
@@ -21,6 +21,7 @@ jobs:
|
||||
testResultsFiles: '**/Public/TestResults.xml'
|
||||
testRunTitle: 'PS_Win2016'
|
||||
displayName: 'Publish Test Results'
|
||||
condition: always()
|
||||
|
||||
- job: Build_PSCore_Ubuntu1604
|
||||
timeoutInMinutes: 10
|
||||
@@ -37,6 +38,7 @@ jobs:
|
||||
testResultsFiles: '**/Public/TestResults.xml'
|
||||
testRunTitle: 'PSCore_Ubuntu1604'
|
||||
displayName: 'Publish Test Results'
|
||||
condition: always()
|
||||
|
||||
- job: Build_PSCore_MacOS1013
|
||||
timeoutInMinutes: 10
|
||||
@@ -53,3 +55,4 @@ jobs:
|
||||
testResultsFiles: '**/Public/TestResults.xml'
|
||||
testRunTitle: 'PSCore_MacOS1013'
|
||||
displayName: 'Publish Test Results'
|
||||
condition: always()
|
||||
|
||||
Reference in New Issue
Block a user