Skip to content

Commit 5ebdf46

Browse files
authored
Run tests weekly + Slack notification (#347)
* weekly ci tests * Finish weekly ci tests workflow
1 parent 44a8442 commit 5ebdf46

1 file changed

Lines changed: 47 additions & 0 deletions

File tree

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Weekly CI tests
2+
3+
# No permissions needed
4+
permissions: {}
5+
6+
# Trigger every Thursday at 9:15 AM Pacific Time (16:15 UTC)
7+
on:
8+
schedule:
9+
- cron: '15 16 * * 4'
10+
11+
jobs:
12+
run-tests:
13+
uses: ./.github/workflows/run-tests.yml
14+
with:
15+
# Use the default branch" (i.e. main)
16+
ref: ''
17+
18+
notify:
19+
name: Notify Slack
20+
needs: run-tests
21+
runs-on: ubuntu-latest
22+
if: always()
23+
steps:
24+
- name: Post result to Slack
25+
uses: slackapi/slack-github-action@b0fa283ad8fea605de13dc3f449259339835fc52
26+
with:
27+
webhook: ${{ secrets.SLACK_WEBHOOK_URL}}
28+
webhook-type: incoming-webhook
29+
payload: |
30+
{
31+
"blocks": [
32+
{
33+
"type": "section",
34+
"text": {
35+
"type": "mrkdwn",
36+
"text": "*Weekly CI tests* <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|run #${{ github.run_number }}> finished."
37+
}
38+
},
39+
{
40+
"type": "section",
41+
"text": {
42+
"type": "mrkdwn",
43+
"text": "${{ needs.run-tests.result == 'success' && '✅ All tests passed!' || '🚨 Some tests failed!' }}"
44+
}
45+
}
46+
]
47+
}

0 commit comments

Comments
 (0)