-
Notifications
You must be signed in to change notification settings - Fork 78
54 lines (51 loc) · 2.06 KB
/
daily_testing.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
46
47
48
49
50
51
52
53
54
# A CI workflow to run tests on a daily cron job.
name: Daily Testing
on:
schedule:
- cron: "00 14 * * *" # Everyday at 3:00 PM UTC (8:00 AM PST)
jobs:
daily_testing:
name: Daily Testing
runs-on: ubuntu-latest
steps:
- name: Setup Dart SDK
uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672
with:
sdk: main
- id: checkout
name: Checkout repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
- id: dwds_pub_upgrade
name: dwds; dart pub upgrade
run: dart pub upgrade
if: "always() && steps.checkout.conclusion == 'success'"
working-directory: dwds
- name: dwds; dart analyze .
run: dart analyze .
if: "always() && steps.dwds_pub_upgrade.conclusion == 'success'"
working-directory: dwds
- id: dwds_daily_tests
name: "dwds; dart test --tags=daily"
run: "dart test --tags=daily"
if: "always() && steps.dwds_pub_upgrade.conclusion == 'success'"
working-directory: dwds
- id: webdev_pub_upgrade
name: webdev; dart pub upgrade
run: dart pub upgrade
if: "always() && steps.checkout.conclusion == 'success'"
working-directory: webdev
- name: webdev; dart analyze .
run: dart analyze .
if: "always() && steps.webdev_pub_upgrade.conclusion == 'success'"
working-directory: webdev
- id: webdev_daily_tests
name: "webdev; dart test --tags=daily"
run: "dart test --tags=daily"
if: "always() && steps.webdev_pub_upgrade.conclusion == 'success'"
working-directory: webdev
- name: "Notify failure"
if: "always() && steps.dwds_daily_tests.conclusion == 'failure' || steps.webdev_daily_tests.conclusion == 'failure'"
run: |
curl -H "Content-Type: application/json" -X POST -d \
"{'text':'Daily Webdev tests failed! ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}'}" \
"${{ secrets.WEBDEV_NOTIFICATION_CHAT_WEBHOOK }}"