Skip to content
This repository was archived by the owner on Jun 6, 2025. It is now read-only.

Commit a868c30

Browse files
committed
feat: Add Slack notification
1 parent 5b66172 commit a868c30

File tree

1 file changed

+32
-2
lines changed

1 file changed

+32
-2
lines changed

.github/workflows/nightly-test.yml

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,46 @@ on:
99

1010
jobs:
1111
placeholder:
12-
name: Run integration tests
12+
name: Run Integration Tests
1313
runs-on: ubuntu-latest
1414
steps:
1515
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
1616
with:
1717
submodules: recursive
18-
- name: Run tests (not)
18+
19+
- name: Run Tests
1920
uses: stackabletech/actions/run-integration-test@run-integration-test
2021
with:
2122
test-platform: kind-1.31.0-amd64
2223
test-run: test-suite
2324
test-parameter: nightly
2425
replicated-api-token: ${{ secrets.REPLICATED_API_TOKEN }}
26+
27+
- name: Fail on Purpose
28+
shell: bash
29+
run: |
30+
exit 1
31+
32+
- name: Send Notification
33+
if: ${{ failure() }}
34+
env:
35+
SLACK_BOT_TOKEN: ${{ secrets.SLACK_INTEGRATION_TEST_TOKEN }}
36+
uses: slackapi/slack-github-action@37ebaef184d7626c5f204ab8d3baff4262dd30f0 # v1.27.0
37+
with:
38+
channel-id: "C07UYKAEE02" # notifications-integration-tests-test
39+
payload: |
40+
{
41+
"text": "Integration Test *${{ github.repository }}* failed",
42+
"attachments": [
43+
{
44+
"color": "#aa0000",
45+
"actions": [
46+
{
47+
"type": "button",
48+
"text": "Go to integration test run",
49+
"url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
50+
}
51+
]
52+
}
53+
]
54+
}

0 commit comments

Comments
 (0)