From c85e37ca1f38a604be749a01ccfc431f3e61a986 Mon Sep 17 00:00:00 2001 From: Alex Evgrashin Date: Sat, 15 Feb 2020 00:26:26 +0300 Subject: [PATCH] Fixed always passing action --- action/steps/run_tests.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/action/steps/run_tests.sh b/action/steps/run_tests.sh index 46b1af2..2ca1329 100644 --- a/action/steps/run_tests.sh +++ b/action/steps/run_tests.sh @@ -83,12 +83,12 @@ if [ $EDIT_MODE = true ]; then -testPlatform editmode \ -testResults "$FULL_ARTIFACTS_PATH/editmode-results.xml" \ $CUSTOM_PARAMETERS - - # Print unity log output - cat "$FULL_ARTIFACTS_PATH/editmode.log" - + # Catch exit code EDIT_MODE_EXIT_CODE=$? + + # Print unity log output + cat "$FULL_ARTIFACTS_PATH/editmode.log" # Display results if [ $EDIT_MODE_EXIT_CODE -eq 0 ]; then @@ -121,13 +121,13 @@ if [ $PLAY_MODE = true ]; then -testPlatform playmode \ -testResults "$FULL_ARTIFACTS_PATH/playmode-results.xml" \ $CUSTOM_PARAMETERS + + # Catch exit code + PLAY_MODE_EXIT_CODE=$? # Print unity log output cat "$FULL_ARTIFACTS_PATH/playmode.log" - # Catch exit code - PLAY_MODE_EXIT_CODE=$? - # Display results if [ $PLAY_MODE_EXIT_CODE -eq 0 ]; then echo "Run succeeded, no failures occurred";