From e8ede9b977fb13d32bc9f23aa49a90e5400a0b0f Mon Sep 17 00:00:00 2001 From: stacey-upshift Date: Fri, 24 Apr 2026 15:42:03 -0700 Subject: [PATCH 1/2] feat: add email notifications on job failure --- .github/workflows/testsPython.yml | 31 ++++++++++++++++++++++++------- 1 file changed, 24 insertions(+), 7 deletions(-) diff --git a/.github/workflows/testsPython.yml b/.github/workflows/testsPython.yml index 452f71d..bc0b8fe 100644 --- a/.github/workflows/testsPython.yml +++ b/.github/workflows/testsPython.yml @@ -69,11 +69,28 @@ jobs: notifications: needs: python-unit-tests runs-on: ubuntu-latest + if: always() steps: - - name: Notify on test results - run: | - if [ "${{ needs.python-unit-tests.result }}" == "success" ]; then - echo "success notifications go here" - else - echo "failure notifications go here" - fi + - name: Send email on failure + if: needs.python-unit-tests.result == 'failure' + uses: dawidd6/action-send-mail@v3 + with: + server_address: smtp.gmail.com + server_port: 465 + username: ${{ secrets.EMAIL_USERNAME }} + password: ${{ secrets.EMAIL_PASSWORD }} + subject: "❌ Python Unit Tests FAILED - ${{ github.repository }}" + to: ${{ secrets.EMAIL_USERNAME }} + from: GitHub Actions <${{ secrets.EMAIL_USERNAME }}> + body: | + The Python Unit Tests workflow has failed. + + Repository: ${{ github.repository }} + Branch: ${{ github.ref_name }} + Commit: ${{ github.sha }} + Triggered by: ${{ github.actor }} + + View the failed run here: + ${{ github.server_url }}/${{ github.repository }}/actions/run/${{ github.run_id }} + + From c765b971d9818c5dd8afba021c6ebbcbc0afdc67 Mon Sep 17 00:00:00 2001 From: stacey-upshift Date: Fri, 24 Apr 2026 16:17:36 -0700 Subject: [PATCH 2/2] fix: update SMTP settings for one.com email: --- .github/workflows/testsPython.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/testsPython.yml b/.github/workflows/testsPython.yml index bc0b8fe..6864d1e 100644 --- a/.github/workflows/testsPython.yml +++ b/.github/workflows/testsPython.yml @@ -75,7 +75,7 @@ jobs: if: needs.python-unit-tests.result == 'failure' uses: dawidd6/action-send-mail@v3 with: - server_address: smtp.gmail.com + server_address: send.one.com server_port: 465 username: ${{ secrets.EMAIL_USERNAME }} password: ${{ secrets.EMAIL_PASSWORD }}