Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 24 additions & 7 deletions .github/workflows/testsPython.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: send.one.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 }}