From 7617558e8bb1c75d7ad7ea56c7662c2cfec28dee Mon Sep 17 00:00:00 2001 From: Leon Schuermann Date: Fri, 8 Nov 2024 11:53:41 -0500 Subject: [PATCH] fix failure detection --- .github/workflows/treadmill-ci.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/treadmill-ci.yml b/.github/workflows/treadmill-ci.yml index abaa72c..5588227 100644 --- a/.github/workflows/treadmill-ci.yml +++ b/.github/workflows/treadmill-ci.yml @@ -276,21 +276,24 @@ jobs:
Test \`$TEST\` ##### Test \`$TEST\` + \`\`\` STEP_SUMMARY_DETAILS # Run the test script, saving its output: echo "===== RUNNING TEST $TEST =====" FAIL=0 - (python3 core/main.py --board boards/nrf52dk.py --test "$TEST" 2>&1 | tee ./job-output.txt) || FAIL=1 + set -o pipefail + python3 core/main.py --board boards/nrf52dk.py --test "$TEST" 2>&1 | tee ./job-output.txt || FAIL=1 + set +o pipefail # Insert the result into the markdown table: if [ "$FAIL" == "0" ]; then echo "| ✅ | \`$TEST\` ([Output](#test-$SANITIZED_TEST_NAME)) |" >>"$GITHUB_STEP_SUMMARY" - STEP_FAIL=1 else echo "===== Test $TEST failed! =====" echo "| ❌ | \`$TEST\` ([Output](#test-$SANITIZED_TEST_NAME)) |" >>"$GITHUB_STEP_SUMMARY" + STEP_FAIL=1 fi # Sanitize the output (remove triple backslashes) and copy it into the step summary details: @@ -299,7 +302,9 @@ jobs: # Finalize this section of the test output summary: cat <>"./step-summary-details.txt" \`\`\` +
+ STEP_SUMMARY_DETAILS # -----------> DONE