Branch was auto-updated.

This commit is contained in:
Bhavin Patel
2024-07-09 09:19:14 -07:00
committed by GitHub
2 changed files with 4 additions and 8 deletions
+3 -6
View File
@@ -23,6 +23,7 @@ def main():
# Extract total_fail value and debug print it
total_fail = data['summary']['total_fail']
print("\033[1mDownload the job artifacts of this run and view complete summary in test_results/summary.yml for troubleshooting failures.\n\033[0m")
print(f"Extracted total_fail: [{total_fail}]\n")
# Print all unit test details first
@@ -44,13 +45,9 @@ def main():
# Check if total_fail is a valid integer and greater than or equal to one
if re.match(r'^[0-9]+$', str(total_fail)) and int(total_fail) >= 1:
# Print the message in bold
print("\033[1m\nCI Failure: There are failed tests.\n\033[0m")
print("\033[1mDownload the job artifacts of this run and view complete summary in test_results/summary.yml for troubleshooting failures.\n\033[0m")
exit(1) # Fail the CI job
print("CI Failure: There are failed tests.\n")
else:
print("CI Success: No failed tests.\n\n")
if __name__ == "__main__":
main()
+1 -2
View File
@@ -51,5 +51,4 @@ jobs:
- name: Formatted Final Report
run: |
python -m pip install --upgrade pip
pip install pyyaml
python .github/workflows/format_test_results.py >> $GITHUB_STEP_SUMMARY
python .github/workflows/format_test_results.py >> $GITHUB_STEP_SUMMARY 2>&1