From 983d18aef77903e0bf22b9b1f2d49506f424421b Mon Sep 17 00:00:00 2001 From: bothzoli Date: Fri, 6 Dec 2024 20:59:04 +1000 Subject: [PATCH] Fail pipeline if test results file is missing This will make sure that the pipeline will not report success if for some reason the test results file is not generated. Issue #580 --- azure-pipelines.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 5cf09d07..f4b6c8fd 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -44,6 +44,14 @@ stages: - script: | docker create --name build-container build-image docker cp build-container:./app/CSharpFunctionalExtensions.Tests/TestResults ./testresults + + # This will make sure that the pipeline fails if the tests were not executed for any reason + if [ ./testresults/testresults.trx ] && [ $(grep -E "