From c7493c5bf56fb22d619fce81162a7246257b5d8a Mon Sep 17 00:00:00 2001 From: Damon Tivel Date: Tue, 17 Sep 2024 11:49:37 -0700 Subject: [PATCH] On failure, upload test results as an artifact. --- .vsts-pr.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.vsts-pr.yml b/.vsts-pr.yml index e246ca35..4a9f3f3a 100644 --- a/.vsts-pr.yml +++ b/.vsts-pr.yml @@ -40,4 +40,13 @@ stages: -prepareMachine name: Build displayName: Build and run tests - condition: succeeded() \ No newline at end of file + condition: succeeded() + - task: PublishTestResults@2 + displayName: 'Publish test results' + inputs: + testResultsFormat: xUnit + testResultsFiles: '$(Build.SourcesDirectory)/artifacts/TestResults/**/*.xml' + mergeTestResults: true + searchFolder: $(System.DefaultWorkingDirectory) + testRunTitle: sign unit tests - $(Agent.JobName) + condition: failed()