Skip to content

Commit ae158bc

Browse files
authored
Merge pull request #3093 from IntersectMBO/fix/incorrect-report-number-on-failure-test-publish-report
fix: handle missing report number in commit status script
2 parents ec4639a + 564be94 commit ae158bc

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

.github/scripts/set_commit_status.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ fi
99
# Retrieve necessary variables from workflow
1010
START_TIME=${START_TIME:-$(date +%s)}
1111
TEST_STATUS=${TEST_STATUS:-"failure"}
12-
REPORT_NUMBER=${REPORT_NUMBER:-1}
12+
REPORT_NUMBER=${REPORT_NUMBER:-0}
1313
REPORT_NAME=${REPORT_NAME:-"govtool-frontend"}
1414
HOST_URL=${HOST_URL:-"https://govtool.cardanoapi.io"}
1515
CONTEXT="Playwright Tests : $HOST_URL"
@@ -64,6 +64,12 @@ else
6464
TARGET_URL="https://github.com/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}"
6565
fi
6666

67+
if [[ "$REPORT_NUMBER" == 0 ]]; then
68+
DESCRIPTION="⚠️ Test execution failed due to missing report number"
69+
TEST_STATUS="error"
70+
TARGET_URL="https://github.com/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}"
71+
fi
72+
6773

6874

6975
# Send commit status update to GitHub

0 commit comments

Comments
 (0)