-
Notifications
You must be signed in to change notification settings - Fork 9
45 lines (39 loc) · 1.08 KB
/
scheduled_test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: Scheduled tests
on:
workflow_dispatch:
schedule:
# Monday at 9:00 UTC
- cron: "0 9 * * 1"
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "8.1"
extensions: ast, mbstring, intl
ini-values: post_max_size=256M, max_execution_time=180
tools: composer
- name: Install dependencies
run: composer install
- name: Test
env:
STREAM_KEY: ${{ secrets.STREAM_API_KEY }}
STREAM_SECRET: ${{ secrets.STREAM_API_SECRET }}
run: |
# Retry 3 times because tests can be flaky
for _ in 1 2 3;
do
vendor/bin/phpunit && break
done
- name: Notify Slack if failed
uses: voxmedia/github-action-slack-notify-build@v1
if: failure()
with:
channel_id: C02RPDF7T63
color: danger
status: FAILED
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_NOTIFICATIONS_BOT_TOKEN }}