From 8a448aef8e28a16ddfdf849770a5724ab81f39f4 Mon Sep 17 00:00:00 2001 From: procome <81840411+procome@users.noreply.github.com> Date: Wed, 22 Apr 2026 20:57:17 -0700 Subject: [PATCH 1/5] Create test-email.yml for email notifications Adds a GitHub Actions workflow to send test emails. --- .github/workflows/test-email.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/test-email.yml diff --git a/.github/workflows/test-email.yml b/.github/workflows/test-email.yml new file mode 100644 index 0000000..6567387 --- /dev/null +++ b/.github/workflows/test-email.yml @@ -0,0 +1,22 @@ +name: Test Email Notification + +on: + workflow_dispatch: # run manually from Actions tab + +jobs: + send-test-email: + runs-on: ubuntu-latest + steps: + - name: Send test email + uses: dawidd6/action-send-mail@v3 + with: + server_address: ${{ secrets.SMTP_SERVER }} + server_port: ${{ secrets.SMTP_PORT }} + username: ${{ secrets.SMTP_USERNAME }} + password: ${{ secrets.SMTP_PASSWORD }} + subject: "GitHub Actions Email Test" + to: ${{ secrets.NOTIFY_EMAIL_TO }} + from: ${{ secrets.NOTIFY_EMAIL_FROM }} + body: | + This is a test email sent from GitHub Actions. + If you received this, your SMTP settings are correct. From 46f8b30728c53539360bb6f76f6650f86773514c Mon Sep 17 00:00:00 2001 From: procome <81840411+procome@users.noreply.github.com> Date: Wed, 22 Apr 2026 21:02:44 -0700 Subject: [PATCH 2/5] Replace email action with s3krit/gh-action-email --- .github/workflows/test-email.yml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/test-email.yml b/.github/workflows/test-email.yml index 6567387..54538e5 100644 --- a/.github/workflows/test-email.yml +++ b/.github/workflows/test-email.yml @@ -7,16 +7,16 @@ jobs: send-test-email: runs-on: ubuntu-latest steps: - - name: Send test email - uses: dawidd6/action-send-mail@v3 - with: - server_address: ${{ secrets.SMTP_SERVER }} - server_port: ${{ secrets.SMTP_PORT }} - username: ${{ secrets.SMTP_USERNAME }} - password: ${{ secrets.SMTP_PASSWORD }} - subject: "GitHub Actions Email Test" - to: ${{ secrets.NOTIFY_EMAIL_TO }} - from: ${{ secrets.NOTIFY_EMAIL_FROM }} - body: | - This is a test email sent from GitHub Actions. - If you received this, your SMTP settings are correct. + - name: Send test email + uses: s3krit/gh-action-email@v1 + with: + server: ${{ secrets.SMTP_SERVER }} + port: ${{ secrets.SMTP_PORT }} + username: ${{ secrets.SMTP_USERNAME }} + password: ${{ secrets.SMTP_PASSWORD }} + subject: "GitHub Actions Email Test" + to: ${{ secrets.NOTIFY_EMAIL_TO }} + from: ${{ secrets.NOTIFY_EMAIL_FROM }} + body: | + This is a test email sent from GitHub Actions. + If you received this, your SMTP settings are correct. From b2ca5ed3a731119cf49edf42ae11a16e7cbb3e15 Mon Sep 17 00:00:00 2001 From: procome <81840411+procome@users.noreply.github.com> Date: Wed, 22 Apr 2026 21:17:44 -0700 Subject: [PATCH 3/5] Replace email action with dawidd6/action-send-mail - working version --- .github/workflows/test-email.yml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/test-email.yml b/.github/workflows/test-email.yml index 54538e5..6567387 100644 --- a/.github/workflows/test-email.yml +++ b/.github/workflows/test-email.yml @@ -7,16 +7,16 @@ jobs: send-test-email: runs-on: ubuntu-latest steps: - - name: Send test email - uses: s3krit/gh-action-email@v1 - with: - server: ${{ secrets.SMTP_SERVER }} - port: ${{ secrets.SMTP_PORT }} - username: ${{ secrets.SMTP_USERNAME }} - password: ${{ secrets.SMTP_PASSWORD }} - subject: "GitHub Actions Email Test" - to: ${{ secrets.NOTIFY_EMAIL_TO }} - from: ${{ secrets.NOTIFY_EMAIL_FROM }} - body: | - This is a test email sent from GitHub Actions. - If you received this, your SMTP settings are correct. + - name: Send test email + uses: dawidd6/action-send-mail@v3 + with: + server_address: ${{ secrets.SMTP_SERVER }} + server_port: ${{ secrets.SMTP_PORT }} + username: ${{ secrets.SMTP_USERNAME }} + password: ${{ secrets.SMTP_PASSWORD }} + subject: "GitHub Actions Email Test" + to: ${{ secrets.NOTIFY_EMAIL_TO }} + from: ${{ secrets.NOTIFY_EMAIL_FROM }} + body: | + This is a test email sent from GitHub Actions. + If you received this, your SMTP settings are correct. From f25edff701616deecfb5b38d815b32c216544050 Mon Sep 17 00:00:00 2001 From: procome <81840411+procome@users.noreply.github.com> Date: Wed, 22 Apr 2026 21:22:43 -0700 Subject: [PATCH 4/5] Email notifications for Python unit test results Updated notification steps to send emails on test results using action-send-mail. --- .github/workflows/testsPython.yml | 52 +++++++++++++++++++++++++------ 1 file changed, 42 insertions(+), 10 deletions(-) diff --git a/.github/workflows/testsPython.yml b/.github/workflows/testsPython.yml index 452f71d..c69f930 100644 --- a/.github/workflows/testsPython.yml +++ b/.github/workflows/testsPython.yml @@ -67,13 +67,45 @@ jobs: # is scaffolded to facilitate sending notifications based # on the test results. notifications: - needs: python-unit-tests - runs-on: ubuntu-latest - 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 + needs: python-unit-tests + runs-on: ubuntu-latest + steps: + - name: Send success email + if: ${{ needs.python-unit-tests.result == 'success' }} + uses: dawidd6/action-send-mail@v3 + with: + server_address: ${{ secrets.SMTP_SERVER }} + server_port: ${{ secrets.SMTP_PORT }} + username: ${{ secrets.SMTP_USERNAME }} + password: ${{ secrets.SMTP_PASSWORD }} + subject: "Python Unit Tests Passed" + to: ${{ secrets.NOTIFY_EMAIL_TO }} + from: ${{ secrets.NOTIFY_EMAIL_FROM }} + body: | + 🎉 Python unit tests succeeded! + + Workflow: Python Unit Tests + Status: SUCCESS + Branch: ${{ github.ref }} + Commit: ${{ github.sha }} + + - name: Send failure email + if: ${{ needs.python-unit-tests.result != 'success' }} + uses: dawidd6/action-send-mail@v3 + with: + server_address: ${{ secrets.SMTP_SERVER }} + server_port: ${{ secrets.SMTP_PORT }} + username: ${{ secrets.SMTP_USERNAME }} + password: ${{ secrets.SMTP_PASSWORD }} + subject: "Python Unit Tests FAILED" + to: ${{ secrets.NOTIFY_EMAIL_TO }} + from: ${{ secrets.NOTIFY_EMAIL_FROM }} + body: | + ❌ Python unit tests failed. + + Workflow: Python Unit Tests + Status: FAILURE + Branch: ${{ github.ref }} + Commit: ${{ github.sha }} + + Check the GitHub Actions logs for details. From 5b2af41ffedfa800b396365247691d590b3768ac Mon Sep 17 00:00:00 2001 From: procome <81840411+procome@users.noreply.github.com> Date: Wed, 22 Apr 2026 21:57:58 -0700 Subject: [PATCH 5/5] Add conditional execution for notifications step, always send notification if: always() --- .github/workflows/testsPython.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/testsPython.yml b/.github/workflows/testsPython.yml index c69f930..0741639 100644 --- a/.github/workflows/testsPython.yml +++ b/.github/workflows/testsPython.yml @@ -68,6 +68,7 @@ jobs: # on the test results. notifications: needs: python-unit-tests + if: always() runs-on: ubuntu-latest steps: - name: Send success email