Skip to content

Automate Alert Generation for Failed Python Tests#42

Open
vickyzhangna wants to merge 4 commits intoFullStackWithLawrence:mainfrom
vickyzhangna:main
Open

Automate Alert Generation for Failed Python Tests#42
vickyzhangna wants to merge 4 commits intoFullStackWithLawrence:mainfrom
vickyzhangna:main

Conversation

@vickyzhangna
Copy link
Copy Markdown

Pull Request Template

Type of Change

  • New Feature: Automated Workflow Notifications
  • Bug fix
  • Documentation
  • Refactor
  • Chore

Resolves

  • Business Impact: This update improves reporting visibility by ensuring that any workflow anomalies are instantly captured and reported as a digital ticket.

Changes

  • Reporting Integration: Added a "notification message" to the testsPython.yml workflow file.
  • Automated Monitoring: Integrated the actions/github-script@v6 tool to interact with the GitHub API.
  • Logic Implementation: Configured a conditional trigger using if: failure() to ensure alerts are only generated when a job fails.

Testing

  • Manual Verification: Verified that the "Listener" (on: push) correctly triggers the automation whenever new code is uploaded.
  • Anomaly Simulation: Performed a test by intentionally breaking a Python test (e.g., changing 2 + 2 = 4 to 2 + 2 = 5) to confirm the notification is triggered only upon failure.
  • Audit Trail: Confirmed that all changes are visible in the GitHub Commit History prior to this submission.

Screenshots

  • Screenshot 1: Workflow Email Alert
Email Notification
  • Screenshot 2: GitHub Commit History
History

Dependencies

  • GitHub Actions: Utilizes the official actions/github-script@v6 repository tool.
  • Internal API: Requires access to github.rest.issues to create tracking tickets.

Breaking Changes

  • None: This is a non-breaking enhancement to the existing CI/CD reporting structure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant