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
30 changes: 23 additions & 7 deletions .github/workflows/testsPython.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ on:
env:
python-version: "3.13"

permissions:
contents: read
issues: write

jobs:
# Job #1: Run Python unit tests
#
Expand Down Expand Up @@ -68,12 +72,24 @@ jobs:
# on the test results.
notifications:
needs: python-unit-tests
if: always() && needs.python-unit-tests.result == 'failure'
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
- name: Create failure notification issue
uses: actions/github-script@v7
with:
script: |
await github.rest.issues.create({
owner: context.repo.owner,
repo: context.repo.repo,
title: `Python unit tests failed: ${context.workflow}`,
body: [
'The Python unit test job failed.',
'',
`Workflow: ${context.workflow}`,
`Run: ${context.serverUrl}/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}`,
`Commit: ${context.sha}`,
`Triggered by: @${context.actor}`
].join('\n'),
assignees: [context.actor]
});