Skip to content

Commit

Permalink
Add smoke test failure notification to lincc-dev channel. (#470)
Browse files Browse the repository at this point in the history
  • Loading branch information
delucchi-cmu authored Aug 26, 2024
1 parent 2815408 commit 1a4729b
Showing 1 changed file with 38 additions and 1 deletion.
39 changes: 38 additions & 1 deletion .github/workflows/smoke-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,41 @@ jobs:
pip list
- name: Run unit tests with pytest / pytest-copie
run: |
python -m pytest
python -m pytest
- name: Send status to Slack app
if: ${{ failure() && github.event_name != 'workflow_dispatch' }}
id: slack
uses: slackapi/slack-github-action@v1
with:
payload: |
{
"blocks": [
{
"type": "header",
"text": {
"type": "plain_text",
"text": "${{ github.repository }}"
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "GitHub Action build result: *${{ job.status }}* :${{ job.status }}:"
}
},
{
"type": "divider"
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
}
}
]
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK

0 comments on commit 1a4729b

Please sign in to comment.