From 913e6e6b2c1150942bd8f5d7402ff673065c6e58 Mon Sep 17 00:00:00 2001 From: lakkeger Date: Wed, 24 Jul 2024 08:56:50 +0000 Subject: [PATCH] fix: add exit code to scenario code suite to reflec results --- .github/actions/scenario-test/controller.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/actions/scenario-test/controller.sh b/.github/actions/scenario-test/controller.sh index 00a8fd8..88c0da2 100755 --- a/.github/actions/scenario-test/controller.sh +++ b/.github/actions/scenario-test/controller.sh @@ -1,6 +1,7 @@ #!/bin/bash TEMPLATE_ID="$1" ALL_RESULTS=" ================== 📋 TEST REPORT ==================\n" +EXIT_CODE=0 set +e @@ -9,6 +10,7 @@ function reportAllScenarioResults { RES="✅ Passed:\t" else RES="❌ Failed:\t" + EXIT_CODE=1 fi ALL_RESULTS="$ALL_RESULTS\n$RES'${1}'" } @@ -69,4 +71,5 @@ for SCENARIO in ${SCENARIOS[@]}; do echo done -echo -e "$ALL_RESULTS" +echo -e "${ALL_RESULTS}" +exit ${EXIT_CODE} \ No newline at end of file