From dc42c59bda9fc7999a2482e1a4922de2abadcdfe Mon Sep 17 00:00:00 2001 From: Xiaogang Date: Fri, 18 Dec 2020 15:03:01 +0800 Subject: [PATCH] Stop when test fails --- .azure-pipelines/util/test-steps.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.azure-pipelines/util/test-steps.yml b/.azure-pipelines/util/test-steps.yml index 9c380ffaaf69..7a6cd137d2c5 100644 --- a/.azure-pipelines/util/test-steps.yml +++ b/.azure-pipelines/util/test-steps.yml @@ -38,6 +38,7 @@ steps: condition: and(succeeded(), ne('${{ parameters.testTarget }}', 'Test')) - pwsh: | + $ErrorActionPreference = 'Stop' Install-Module -Name Pester -RequiredVersion 4.10.1 -Force Install-Module -Name Az.Accounts -Scope CurrentUser -Force if ($IsWindows) { $sp = ";" } else { $sp = ":" } @@ -54,4 +55,4 @@ steps: - template: publish-artifacts-steps.yml parameters: - artifactName: test-${{ parameters.osName }} \ No newline at end of file + artifactName: test-${{ parameters.osName }}