Skip to content

Commit a02f46a

Browse files
ci: send slack message when ci fails on main
1 parent 407cf62 commit a02f46a

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

.github/workflows/on-merge.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,24 @@ jobs:
99
test:
1010
uses: ./.github/workflows/test.yaml
1111
secrets: inherit
12+
13+
notify-slack:
14+
needs: test
15+
if: failure()
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Send Slack Notification
19+
uses: slackapi/[email protected]
20+
with:
21+
payload: |
22+
{
23+
"text": ":rotating_light: *CI FAILED on main!*",
24+
"attachments": [
25+
{
26+
"color": "danger",
27+
"text": "Workflow: ${{ github.workflow }}\nJob: ${{ github.job }}\nCommit: ${{ github.sha }}\nAuthor: ${{ github.actor }}"
28+
}
29+
]
30+
}
31+
env:
32+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

src/flow_test/test.cairo

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3029,3 +3029,8 @@ fn enable_disable_btc_tokens_flow_test() {
30293029
.span();
30303030
assert!(tokens == expected_tokens);
30313031
}
3032+
3033+
#[test]
3034+
fn test_test() {
3035+
panic!("test");
3036+
}

0 commit comments

Comments
 (0)