mirror of
https://github.com/beetbox/beets.git
synced 2025-12-31 21:12:43 +01:00
Notify Zulip chat on integration test failure
This commit is contained in:
parent
9291d9c304
commit
c9f9f9691d
1 changed files with 17 additions and 0 deletions
17
.github/workflows/integration_test.yaml
vendored
17
.github/workflows/integration_test.yaml
vendored
|
|
@ -25,3 +25,20 @@ jobs:
|
|||
- name: Test with tox
|
||||
run: |
|
||||
tox -e int
|
||||
|
||||
- name: Notify on failure
|
||||
if: ${{ failure() }}
|
||||
env:
|
||||
ZULIP_BOT_CREDENTIALS: ${{ secrets.ZULIP_BOT_CREDENTIALS }}
|
||||
run: |
|
||||
if [ -z "${ZULIP_BOT_CREDENTIALS}" ]; then
|
||||
echo "Skipping notify, ZULIP_BOT_CREDENTIALS is unset"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
curl -X POST https://beets.zulipchat.com/api/v1/messages \
|
||||
-u "${ZULIP_BOT_CREDENTIALS}" \
|
||||
-d "type=stream" \
|
||||
-d "to=general" \
|
||||
-d "subject=${GITHUB_WORKFLOW} - $(date -u +%Y-%m-%d)" \
|
||||
-d "content=[${GITHUB_WORKFLOW}#${GITHUB_RUN_NUMBER}](${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}) failed."
|
||||
|
|
|
|||
Loading…
Reference in a new issue