-
Notifications
You must be signed in to change notification settings - Fork 80
41 lines (35 loc) · 1.19 KB
/
scheduled_test.yml
File metadata and controls
41 lines (35 loc) · 1.19 KB
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
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@v6
- uses: ./.github/actions/setup-node
- name: Build project
run: yarn build
- name: Run test
env:
API_KEY: ${{ secrets.TS_TEST_API_KEY }}
API_SECRET: ${{ secrets.TS_TEST_API_SECRET }}
MULTITENANCY_API_KEY: ${{ secrets.TS_TEST_MULTITENANCY_API_KEY }}
MULTITENANCY_API_SECRET: ${{ secrets.TS_TEST_MULTITENANCY_API_SECRET }}
run: |
# Retry 3 times because tests can be flaky
for _ in 1 2 3;
do
yarn test-types && break
done
- name: Notify Slack if failed
if: failure()
uses: slackapi/slack-github-action@v3
with:
method: chat.postMessage
token: ${{ secrets.SLACK_NOTIFICATIONS_BOT_TOKEN }}
payload: |
channel: "C02RPDF7T63"
text: "Scheduled tests FAILED on ${{ github.repository }}@${{ github.ref_name }} — <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|view run>"