From f3d25dc1c510a92bdf739845fa9cad960e6d8cbd Mon Sep 17 00:00:00 2001 From: Jeffrey Fung Date: Fri, 24 Apr 2026 16:51:18 -0700 Subject: [PATCH] feat: added notification if tests returns with status failure --- .github/workflows/testsPython.yml | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/.github/workflows/testsPython.yml b/.github/workflows/testsPython.yml index 452f71d..d6d042e 100644 --- a/.github/workflows/testsPython.yml +++ b/.github/workflows/testsPython.yml @@ -73,7 +73,18 @@ jobs: - name: Notify on test results run: | if [ "${{ needs.python-unit-tests.result }}" == "success" ]; then - echo "success notifications go here" + echo "✅ Tests passed! No action required." else - echo "failure notifications go here" - fi + uses: dawidd6/action-send-mail@v3 + with: + server_address: smtp.gmail.com + server_port: 465 + username: ${{ secrets.EMAIL_USERNAME }} + password: ${{ secrets.EMAIL_PASSWORD }} + subject: "❌ CRITICAL: Python Unit Tests failed on ${{ github.repository }}" + to: ${{ secrets.EMAILS_TO_NOTIFY }} + from: GitHub Actions + body: | + Branch: ${{ github.ref_name }} + Triggered by: ${{ github.actor }} + fi \ No newline at end of file