Skip to content

Commit

Permalink
Add GitHub Action job to report start of test and deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
orome committed Nov 7, 2023
1 parent cd78d6b commit 41a439a
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions .github/workflows/test-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,23 @@ env:

jobs:

on_start:

name: Report Start
runs-on: ubuntu-latest

steps:

- name: Log start
run: echo "Started..."

- name: Post Discord success notification
# noinspection SpellCheckingInspection
uses: tsickert/[email protected]
with:
webhook-url: ${{ secrets.DISCORD_CODING_WEBHOOK_URL }}
content: "${{ github.repository }} - [${{ github.actor }}] ${{ github.workflow }} - started\n"

test:

name: Python ${{ matrix.python-version }} (${{ matrix.os }})
Expand Down Expand Up @@ -55,6 +72,7 @@ jobs:
PYTHONPATH=. python tests/eyeball.py
- name: Test with pytest
# noinspection SpellCheckingInspection
run: |
pip install pytest
pytest tests/ --maxfail=3 --showlocals --color=yes -v
Expand Down Expand Up @@ -263,10 +281,11 @@ jobs:
echo "${FAILED_JOB} Failure!"
- name: Post Discord failure notification
# noinspection SpellCheckingInspection
uses: tsickert/[email protected]
with:
webhook-url: ${{ secrets.DISCORD_CODING_WEBHOOK_URL }}
content: "${{ github.repository }} - [${{ github.actor }}] ${{ github.workflow }} - ${{ steps.failed_job.outputs.FAILED_JOB }} Failed!\n<@${{ secrets.DISCORD_USER_ID }}>"
content: "${{ github.repository }} - [${{ github.actor }}] ${{ github.workflow }} - ${{ steps.failed_job.outputs.FAILED_JOB }} FAILED!\n<@${{ secrets.DISCORD_USER_ID }}>"

on_success:

Expand All @@ -281,7 +300,8 @@ jobs:
run: echo "Success!"

- name: Post Discord success notification
# noinspection SpellCheckingInspection
uses: tsickert/[email protected]
with:
webhook-url: ${{ secrets.DISCORD_CODING_WEBHOOK_URL }}
content: "${{ github.repository }} - [${{ github.actor }}] ${{ github.workflow }} - Succeeded!\n<@${{ secrets.DISCORD_USER_ID }}>"
content: "${{ github.repository }} - [${{ github.actor }}] ${{ github.workflow }} - succeeded\n<@${{ secrets.DISCORD_USER_ID }}>"

0 comments on commit 41a439a

Please sign in to comment.