only alert on failure (#423)

This commit is contained in:
Jack Forgash 2025-04-04 13:35:59 -06:00 committed by GitHub
parent a85fa0cf65
commit 43e458cc02
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -124,4 +124,8 @@ def send_alert(webhook_url):
if __name__ == '__main__':
webhook_url = os.environ.get("SLACK_WEBHOOK_URL")
send_alert(webhook_url)
data = log_test_result()
# Only send an alert if there are failures
if data['fail_count'] > 0:
send_alert(webhook_url)