File tree Expand file tree Collapse file tree
.github/actions/smoke-test-retry Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -101,11 +101,14 @@ runs:
101101
102102 OUTPUT_FILE="${GITHUB_WORKSPACE}/failed-tests-batch-${BATCH}.txt"
103103
104+ # The parser uses non-zero exit codes as signals (1=error, 2=all_passed,
105+ # 3=no_artifacts), not failures. GitHub runs composite bash steps with
106+ # `-eo pipefail`, so capture the code via `|| EXIT_CODE=$?` to keep
107+ # errexit from aborting the step before the case below can read it.
108+ EXIT_CODE=0
104109 python3 .github/scripts/parse_failed_cypress_tests.py \
105110 --input-dir "${GITHUB_WORKSPACE}/previous-test-results" \
106- --output "${OUTPUT_FILE}"
107-
108- EXIT_CODE=$?
111+ --output "${OUTPUT_FILE}" || EXIT_CODE=$?
109112
110113 case $EXIT_CODE in
111114 0)
@@ -139,11 +142,12 @@ runs:
139142
140143 OUTPUT_FILE="${GITHUB_WORKSPACE}/failed-modules-batch-${BATCH}.txt"
141144
145+ # See the cypress parse step: capture the parser's signal exit code via
146+ # `|| EXIT_CODE=$?` so `bash -e` doesn't abort the step before the case.
147+ EXIT_CODE=0
142148 python3 .github/scripts/parse_failed_pytest_tests.py \
143149 --input-dir "${GITHUB_WORKSPACE}/previous-test-results" \
144- --output "${OUTPUT_FILE}"
145-
146- EXIT_CODE=$?
150+ --output "${OUTPUT_FILE}" || EXIT_CODE=$?
147151
148152 case $EXIT_CODE in
149153 0)
You can’t perform that action at this time.
0 commit comments