@@ -2,9 +2,8 @@ name: Monitoring Tests
2
2
3
3
on :
4
4
schedule :
5
- - cron : ' 21 2 * * *' # every day at 5 :21 AM UTC
5
+ - cron : ' 21 2 * * *' # every day at 2 :21 AM UTC
6
6
workflow_dispatch : # allow manually triggering a run
7
- pull_request :
8
7
9
8
10
9
env :
@@ -40,18 +39,36 @@ jobs:
40
39
path : .3l_local_test
41
40
key : monitor-local-test-cache
42
41
- name : Run monitoring tests
42
+ id : monitortest
43
43
run : make monitortest
44
44
continue-on-error : true
45
45
- name : Save .3l_local_test cache
46
46
uses : actions/cache/save@v4
47
47
with :
48
48
path : .3l_local_test
49
49
key : monitor-local-test-cache
50
+ - name : Check test result
51
+ run : |
52
+ if [ ${{ steps.monitortest.outcome }} == "failure" ]; then
53
+ echo "Tests failed"
54
+ echo "failure" > test_status.txt
55
+ else
56
+ echo "Tests passed"
57
+ echo "success" > test_status.txt
58
+ fi
50
59
- name : Process and publish results
51
60
run : |
52
61
./generate_report.sh
53
62
54
- curl -X POST \
55
- -H "Content-type: application/json" \
56
- --data "$(cat slack_message.json)" \
57
- ${{ secrets.LIPA_SLACK_3L_MONITORING_BOT_WEBHOOK_URL }}
63
+ TEST_STATUS=$(cat test_status.txt)
64
+ if [ "$TEST_STATUS" = "failure" ]; then
65
+ curl -X POST \
66
+ -H "Content-type: application/json" \
67
+ --data "$(cat slack_message.json)" \
68
+ ${{ secrets.LIPA_SLACK_3L_MONITORING_FAILURE_BOT_WEBHOOK_URL }}
69
+ else
70
+ curl -X POST \
71
+ -H "Content-type: application/json" \
72
+ --data "$(cat slack_message.json)" \
73
+ ${{ secrets.LIPA_SLACK_3L_MONITORING_BOT_WEBHOOK_URL }}
74
+ fi
0 commit comments