File tree 3 files changed +38
-0
lines changed
3 files changed +38
-0
lines changed Original file line number Diff line number Diff line change
1
+ # A CI workflow to run tests on a daily cron job.
2
+
3
+ name : Daily Testing
4
+
5
+ on :
6
+ schedule :
7
+ - cron : ' 00 14 * * *' # Everyday at 3:00 PM UTC (8:00 AM PST)
8
+
9
+ jobs :
10
+ daily_testing :
11
+ name : Daily Testing
12
+ runs-on : ubuntu-latest
13
+ steps :
14
+ - name : Setup Dart SDK
15
+ uses : dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f
16
+ with :
17
+ sdk : main
18
+ - id : checkout
19
+ name : Checkout repository
20
+ uses : actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3
21
+ - id : dwds_pub_upgrade
22
+ name : dwds; dart pub upgrade
23
+ run : dart pub upgrade
24
+ if : " always() && steps.checkout.conclusion == 'success'"
25
+ working-directory : dwds
26
+ - id : dwds_daily_tests
27
+ name : " dwds; dart test --tags=daily"
28
+ run : " dart test --tags=daily"
29
+ if : " always() && steps.dwds_pub_upgrade.conclusion == 'success'"
30
+ working-directory : dwds
31
+ - name : " Notify failure"
32
+ if : " always() && steps.dwds_daily_tests.conclusion == 'failure'"
33
+ run : |
34
+ curl -H "Content-Type: application/json" -X POST -d \
35
+ "{'text':'Daily Webdev tests failed! ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}'}" \
36
+ "${{ secrets.WEBDEV_NOTIFICATION_CHAT_WEBHOOK }}"
Original file line number Diff line number Diff line change 3
3
4
4
tags :
5
5
extension : # Extension tests require configuration, so we may exclude.
6
+ daily : # Daily tests also run on a scheduled daily cron job.
Original file line number Diff line number Diff line change 3
3
// BSD-style license that can be found in the LICENSE file.
4
4
5
5
@TestOn ('vm' )
6
+ @Tags (['daily' ])
6
7
@Timeout (Duration (minutes: 2 ))
7
8
import 'dart:async' ;
8
9
import 'dart:convert' ;
You can’t perform that action at this time.
0 commit comments