From 4f23577cb52334d84e7bbf7fb3404b4ceda2531b Mon Sep 17 00:00:00 2001 From: Edward Chen <18449977+edgchen1@users.noreply.github.com> Date: Mon, 12 Jun 2023 17:56:46 -0700 Subject: [PATCH] [React Native] Publish E2E test logs on build failure too. (#16327) ### Description Publish E2E test logs on build failure too. ### Motivation and Context Get more information about intermittent test failures. --- .../github/azure-pipelines/templates/react-native-ci.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tools/ci_build/github/azure-pipelines/templates/react-native-ci.yml b/tools/ci_build/github/azure-pipelines/templates/react-native-ci.yml index e5e82e3a7d..6cc81452f4 100644 --- a/tools/ci_build/github/azure-pipelines/templates/react-native-ci.yml +++ b/tools/ci_build/github/azure-pipelines/templates/react-native-ci.yml @@ -300,7 +300,7 @@ stages: - script: | JEST_JUNIT_OUTPUT_FILE=$(Build.SourcesDirectory)/js/react_native/e2e/android-test-results.xml \ - detox test --record-logs all --configuration android.emu.release + detox test --record-logs all --configuration android.emu.release workingDirectory: '$(Build.SourcesDirectory)/js/react_native/e2e' displayName: Run React Native Detox Android e2e Tests @@ -333,8 +333,10 @@ stages: - task: PublishPipelineArtifact@1 inputs: - targetPath: '$(Build.SourcesDirectory)/js/react_native/e2e/artifacts' - displayName: Publish React Native Detox E2E test artifacts + artifact: e2e_test_logs + targetPath: '$(Build.SourcesDirectory)/js/react_native/e2e/artifacts' + condition: succeededOrFailed() + displayName: Publish React Native Detox E2E test logs - script: | python3 tools/python/run_android_emulator.py \