From bf466c8ef3ea30c3a8abfa6e2d6442e81d583a55 Mon Sep 17 00:00:00 2001 From: hmartinebc Date: Wed, 29 Apr 2026 17:38:58 -0700 Subject: [PATCH 1/7] Update notification step to use Slack for failures Replaced the previous notification step with a Slack notification for build failures. --- .github/workflows/testsPython.yml | 36 +++++++++++++++++++++---------- 1 file changed, 25 insertions(+), 11 deletions(-) diff --git a/.github/workflows/testsPython.yml b/.github/workflows/testsPython.yml index 452f71d..753a8da 100644 --- a/.github/workflows/testsPython.yml +++ b/.github/workflows/testsPython.yml @@ -66,14 +66,28 @@ jobs: # This job will run after the Python unit tests and # 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 +# 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 + - name: Notify Slack on failure + if: failure() # only runs when a previous step fails + uses: slackapi/slack-github-action@v2.0.0 + with: + channel-id: "YOUR_CHANNEL_ID" + slack-message: | + :red_circle: *Build failed!* + Repo: '${{ github.repository }}' + Branch: '${{ github.ref_name }}' + Commit: '${{ github.sha }}' + Actor: ${{ github.actor }} + Logs: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} + env: + SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} From dda704ce375fdb166a09e7ecfb2f639c818054ed Mon Sep 17 00:00:00 2001 From: hmartinebc Date: Wed, 29 Apr 2026 18:48:13 -0700 Subject: [PATCH 2/7] Replace Slack notification with Discord notification --- .github/workflows/testsPython.yml | 38 ++++++++++++++++++++----------- 1 file changed, 25 insertions(+), 13 deletions(-) diff --git a/.github/workflows/testsPython.yml b/.github/workflows/testsPython.yml index 753a8da..464b8fa 100644 --- a/.github/workflows/testsPython.yml +++ b/.github/workflows/testsPython.yml @@ -77,17 +77,29 @@ jobs: # else # echo "failure notifications go here" # fi - - name: Notify Slack on failure - if: failure() # only runs when a previous step fails - uses: slackapi/slack-github-action@v2.0.0 - with: - channel-id: "YOUR_CHANNEL_ID" - slack-message: | - :red_circle: *Build failed!* - Repo: '${{ github.repository }}' - Branch: '${{ github.ref_name }}' - Commit: '${{ github.sha }}' - Actor: ${{ github.actor }} - Logs: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} + name: Notify Discord on failure + if: failure() + run: | + curl -H "Content-Type: application/json" \ + -X POST \ + -d '{ + "embeds": [{ + "title": "❌ CI Build Failed", + "color": 15548997, + "fields": [ + {"name": "Repository", "value": "'"$REPO"'", "inline": true}, + {"name": "Branch", "value": "'"$BRANCH"'", "inline": true}, + {"name": "Commit", "value": "'"$SHA"'", "inline": false}, + {"name": "Triggered by", "value": "'"$ACTOR"'","inline": true}, + {"name": "Logs", "value": "[View run]('"$LOGS_URL"')", "inline": false} + ] + }] + }' \ + "$DISCORD_WEBHOOK_URL" env: - SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} + DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }} + REPO: ${{ github.repository }} + BRANCH: ${{ github.ref_name }} + SHA: ${{ github.sha }} + ACTOR: ${{ github.actor }} + LOGS_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} From 3cb8e9a844f83036cf8e6d3a372817bb2c356dfd Mon Sep 17 00:00:00 2001 From: hmartinebc Date: Wed, 29 Apr 2026 19:24:19 -0700 Subject: [PATCH 3/7] Change Discord notification condition to always --- .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 464b8fa..09a067f 100644 --- a/.github/workflows/testsPython.yml +++ b/.github/workflows/testsPython.yml @@ -78,7 +78,7 @@ jobs: # echo "failure notifications go here" # fi name: Notify Discord on failure - if: failure() + if: always() run: | curl -H "Content-Type: application/json" \ -X POST \ From 6dafab52ffece620feacb0d4f983c36a284a2b5b Mon Sep 17 00:00:00 2001 From: hmartinebc Date: Wed, 29 Apr 2026 20:31:14 -0700 Subject: [PATCH 4/7] Fix formatting in testsPython.yml From 4f1a720ebfda522bb36af14d0006e2ecbaa503bd Mon Sep 17 00:00:00 2001 From: hmartinebc Date: Thu, 30 Apr 2026 10:33:36 -0700 Subject: [PATCH 5/7] Enable notifications job in GitHub Actions workflow --- .github/workflows/testsPython.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/testsPython.yml b/.github/workflows/testsPython.yml index 09a067f..459a444 100644 --- a/.github/workflows/testsPython.yml +++ b/.github/workflows/testsPython.yml @@ -66,10 +66,10 @@ jobs: # This job will run after the Python unit tests and # is scaffolded to facilitate sending notifications based # on the test results. -# notifications: -# needs: python-unit-tests -# runs-on: ubuntu-latest -# steps: + notifications: + needs: python-unit-tests + runs-on: ubuntu-latest + steps: # - name: Notify on test results # run: | # if [ "${{ needs.python-unit-tests.result }}" == "success" ]; then @@ -77,7 +77,7 @@ jobs: # else # echo "failure notifications go here" # fi - name: Notify Discord on failure + - name: Notify Discord on failure if: always() run: | curl -H "Content-Type: application/json" \ From b618a5b2b818d05e8ffe71ac659d0af08125e24f Mon Sep 17 00:00:00 2001 From: hmartinebc Date: Thu, 30 Apr 2026 16:19:24 -0700 Subject: [PATCH 6/7] Refactor Discord notification step in CI workflow --- .github/workflows/testsPython.yml | 50 +++++++++++++++---------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/.github/workflows/testsPython.yml b/.github/workflows/testsPython.yml index 459a444..b9512fa 100644 --- a/.github/workflows/testsPython.yml +++ b/.github/workflows/testsPython.yml @@ -78,28 +78,28 @@ jobs: # echo "failure notifications go here" # fi - name: Notify Discord on failure - if: always() - run: | - curl -H "Content-Type: application/json" \ - -X POST \ - -d '{ - "embeds": [{ - "title": "❌ CI Build Failed", - "color": 15548997, - "fields": [ - {"name": "Repository", "value": "'"$REPO"'", "inline": true}, - {"name": "Branch", "value": "'"$BRANCH"'", "inline": true}, - {"name": "Commit", "value": "'"$SHA"'", "inline": false}, - {"name": "Triggered by", "value": "'"$ACTOR"'","inline": true}, - {"name": "Logs", "value": "[View run]('"$LOGS_URL"')", "inline": false} - ] - }] - }' \ - "$DISCORD_WEBHOOK_URL" - env: - DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }} - REPO: ${{ github.repository }} - BRANCH: ${{ github.ref_name }} - SHA: ${{ github.sha }} - ACTOR: ${{ github.actor }} - LOGS_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} + if: always() + run: | + curl -H "Content-Type: application/json" \ + -X POST \ + -d '{ + "embeds": [{ + "title": "❌ CI Build Failed", + "color": 15548997, + "fields": [ + {"name": "Repository", "value": "'"$REPO"'", "inline": true}, + {"name": "Branch", "value": "'"$BRANCH"'", "inline": true}, + {"name": "Commit", "value": "'"$SHA"'", "inline": false}, + {"name": "Triggered by", "value": "'"$ACTOR"'","inline": true}, + {"name": "Logs", "value": "[View run]('"$LOGS_URL"')", "inline": false} + ] + }] + }' \ + "$DISCORD_WEBHOOK_URL" + env: + DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }} + REPO: ${{ github.repository }} + BRANCH: ${{ github.ref_name }} + SHA: ${{ github.sha }} + ACTOR: ${{ github.actor }} + LOGS_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} From e58c21c01c72a120aa194cdb009d0fa3e5eb4880 Mon Sep 17 00:00:00 2001 From: hmartinebc Date: Fri, 1 May 2026 12:06:25 -0700 Subject: [PATCH 7/7] Add comment for run environment in testsPython.yml test for pull request --- .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 b9512fa..583822f 100644 --- a/.github/workflows/testsPython.yml +++ b/.github/workflows/testsPython.yml @@ -34,7 +34,7 @@ on: env: python-version: "3.13" - + # define run environment jobs: # Job #1: Run Python unit tests #