Skip to content

Commit 1a4729b

Browse files
authored
Add smoke test failure notification to lincc-dev channel. (#470)
1 parent 2815408 commit 1a4729b

File tree

1 file changed

+38
-1
lines changed

1 file changed

+38
-1
lines changed

.github/workflows/smoke-test.yml

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,41 @@ jobs:
3838
pip list
3939
- name: Run unit tests with pytest / pytest-copie
4040
run: |
41-
python -m pytest
41+
python -m pytest
42+
- name: Send status to Slack app
43+
if: ${{ failure() && github.event_name != 'workflow_dispatch' }}
44+
id: slack
45+
uses: slackapi/slack-github-action@v1
46+
with:
47+
payload: |
48+
{
49+
"blocks": [
50+
{
51+
"type": "header",
52+
"text": {
53+
"type": "plain_text",
54+
"text": "${{ github.repository }}"
55+
}
56+
},
57+
{
58+
"type": "section",
59+
"text": {
60+
"type": "mrkdwn",
61+
"text": "GitHub Action build result: *${{ job.status }}* :${{ job.status }}:"
62+
}
63+
},
64+
{
65+
"type": "divider"
66+
},
67+
{
68+
"type": "section",
69+
"text": {
70+
"type": "mrkdwn",
71+
"text": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
72+
}
73+
}
74+
]
75+
}
76+
env:
77+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
78+
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK

0 commit comments

Comments
 (0)