@@ -103,6 +103,7 @@ jobs:
103
103
# For the available images see
104
104
# https://book.treadmill.ci/treadmillci-deployment/images.html
105
105
IMAGE_ID : 7222c531071705fcaaf2a82504c3d09c93701d8a307de266fb551294911a1181
106
+
106
107
# Limit the supervisors to hosts that are compatible with this
107
108
# image. This is a hack until we introduce "image sets" which define
108
109
# multiple images for various supervisor hosts, but otherwise behave
@@ -293,7 +294,7 @@ jobs:
293
294
# Activate the virtual environment from the hwci directory
294
295
source ./hwci/.venv/bin/activate
295
296
296
- STEP_FAIL=0
297
+ FAILED_TESTS=""
297
298
298
299
# Generate a summary of all the tests executed:
299
300
cat <<GITHUB_STEP_SUMMARY >>"$GITHUB_STEP_SUMMARY"
@@ -306,6 +307,9 @@ jobs:
306
307
while read TEST; do
307
308
# WHILE ---------->
308
309
310
+ # Open a new "group" in the GitHub actions output for this test:
311
+ echo "::group::Test ${TEST}"
312
+
309
313
# For markdown links, we want a sanitized test name without special characters
310
314
SANITIZED_TEST_NAME="${TEST//[^[:alnum:]]/_}"
311
315
@@ -429,7 +433,11 @@ jobs:
429
433
else
430
434
echo "===== Test $TEST failed! ====="
431
435
echo "| ❌ | \`$TEST\` ([Output](#test-$SANITIZED_TEST_NAME)) |" >>"$GITHUB_STEP_SUMMARY"
432
- STEP_FAIL=1
436
+
437
+ # Append this test to the list of failed tests (prefixing
438
+ # it with a comma, if other tests have already failed:
439
+ test -n "${FAILED_TESTS}" && FAILED_TESTS="${FAILED_TESTS}, "
440
+ FAILED_TESTS="${FAILED_TESTS}${TEST}"
433
441
fi
434
442
435
443
# Sanitize the output (remove triple backslashes) and copy it into the step summary details:
@@ -443,6 +451,9 @@ jobs:
443
451
444
452
STEP_SUMMARY_DETAILS
445
453
454
+ # Close the "group" in the GitHub actions output:
455
+ echo "::endgroup::"
456
+
446
457
# -----------> DONE
447
458
done < <(echo "$JSON_TEST_ARRAY" | jq -r -c '.[]')
448
459
@@ -451,8 +462,8 @@ jobs:
451
462
cat "./step-summary-details.txt" >>"$GITHUB_STEP_SUMMARY"
452
463
453
464
# Exit with an error if at least one test failed:
454
- if [ "$STEP_FAIL " != "0 " ]; then
455
- echo "At least one test failed, exiting with error. "
465
+ if [ "$FAILED_TESTS " != "" ]; then
466
+ echo "One or more tests failed, exiting with error: $FAILED_TESTS "
456
467
exit 1
457
468
fi
458
469
- name : Request shutdown after successful job completion
0 commit comments