[CI] Set status as error if one or more tests failed. (#11170)

Co-authored-by: Alex Soto <alex@alexsoto.me>
This commit is contained in:
Manuel de la Pena 2021-04-09 21:52:25 -04:00 коммит произвёл GitHub
Родитель b483c26db4
Коммит 75e913ed4f
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 3 добавлений и 0 удалений

Просмотреть файл

@ -119,6 +119,9 @@ steps:
if($Env:TESTS_JOBSTATUS -ne "Succeeded")
{
Set-PipelineResult -Status partiallySucceeded
Set-GitHubStatus -Status "error" -Description "Some tests failed." -Context "$(Build.DefinitionName) (Test run)"
} else {
Set-GitHubStatus -Status "success" -Description "All tests passed." -Context "$(Build.DefinitionName) (Test run)"
}
env:
BUILD_REVISION: $(Build.SourceVersion)