Skip to content

DAP20: Add GitHub Actions test notifications for Slack, Discord, Teams, email, and SMS#80

Open
AustinKobayashi wants to merge 1 commit into
FullStackWithLawrence:mainfrom
AustinKobayashi:main
Open

DAP20: Add GitHub Actions test notifications for Slack, Discord, Teams, email, and SMS#80
AustinKobayashi wants to merge 1 commit into
FullStackWithLawrence:mainfrom
AustinKobayashi:main

Conversation

@AustinKobayashi
Copy link
Copy Markdown

@AustinKobayashi AustinKobayashi commented May 16, 2026

Type of Change

  • New feature
  • Bug fix
  • Documentation
  • Refactor
  • Chore

Changes

Adds configurable GitHub Actions notifications to the existing Python Unit Tests workflow.

This PR adds notification support for:

  • Slack webhooks
  • Discord webhooks
  • Microsoft Teams / Power Automate webhooks
  • Mailgun email
  • Twilio SMS

The notification job runs after the Python unit test job and sends notifications when tests fail. It also supports manual workflow testing through a notification-mode input:

  • notify-on-failure: default behavior, sends only when tests fail
  • dry-run: prints parsed addressee lists and payloads without sending
  • test-notification: sends a test notification even if tests pass

Addressees are configured through GitHub Actions secrets and variables. Providers that support multiple destinations use JSON array configuration. Slack and Discord support optional mentions per webhook target.

The notification script uses only the Python standard library, so no new Python package dependencies are required.

A workflow README was also added with setup instructions, vendor configuration examples, and manual testing instructions.

Testing

Notification behavior was manually tested from GitHub Actions using the workflow_dispatch trigger.

Verified notification delivery for:

  • Slack
  • Discord
  • Microsoft Teams
  • Mailgun email
  • Twilio SMS

The dry-run mode was tested to confirm that parsed addressee lists and payloads are printed without sending real notifications. Dry-run output masks webhook URLs, email addresses, phone numbers, and provider-specific domain details where appropriate.

The Python unit tests currently fail in my fork because the fork does not have all of the repository secrets/configuration values used by the upstream test environment. For example, the test workflow expects database-related environment values such as MYSQL_PORT, and my fork does not currently have the full upstream secret set configured. The visible failure appears unrelated to the notification changes.

Screenshots

Slack notification:

image

Discord notification:

image

Microsoft Teams notification:

image

Mailgun email notification:

image

Twilio SMS notification:

IMG_2667

Dry-run output:

image

Dependencies

No new Python package dependencies were added. The notification script uses only the Python standard library.

Runtime provider configuration is required through GitHub Actions secrets and variables for any enabled provider:

  • Slack webhook URL targets
  • Discord webhook URL targets
  • Teams webhook URLs
  • Mailgun API key, domain, sender, and recipients
  • Twilio account credentials, sender, and recipients

Breaking Changes

None.

This adds optional notification configuration to the existing workflow and does not change the application runtime behavior.

@AustinKobayashi AustinKobayashi marked this pull request as ready for review May 16, 2026 00:28
@AustinKobayashi AustinKobayashi changed the title Added GitHub notification support for Slack, Discord, Teams, Email, and SMS DAP20 Added GitHub test notification support for Slack, Discord, Teams, Email, and SMS May 16, 2026
@AustinKobayashi AustinKobayashi changed the title DAP20 Added GitHub test notification support for Slack, Discord, Teams, Email, and SMS DAP20: Add GitHub Actions test notifications for Slack, Discord, Teams, email, and SMS May 16, 2026
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