mirror of
https://github.com/splunk/security_content
synced 2026-06-08 17:32:49 +00:00
Branch was auto-updated.
This commit is contained in:
@@ -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()
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user