@@ -3,42 +3,59 @@ name: Dart CI
3
3
on :
4
4
push :
5
5
branches : [ master ]
6
+ paths-ignore : [ '**.md' ]
6
7
pull_request :
7
8
branches : [ master ]
9
+ paths-ignore : [ '**.md' ]
10
+ schedule :
11
+ # Runs at 02:00 UTC on the 1, 4, 7, 10, 13, 16, 19, 22, 25, 28 and 31st of every month.
12
+ - cron : " 0 2 */3 * *"
13
+ workflow_dispatch :
8
14
9
15
jobs :
10
16
build :
11
17
12
18
runs-on : ubuntu-latest
13
19
14
- container :
15
- image : google/dart:latest
20
+ strategy :
21
+ matrix :
22
+ sdk : [ beta, stable, 2.15.0, 2.12.0 ]
16
23
17
24
steps :
18
- - uses : actions/checkout@v2
25
+ - uses : actions/checkout@v3
26
+
27
+ - name : Setup Dart
28
+
29
+ with :
30
+ sdk : ${{ matrix.sdk }}
31
+
32
+ - name : Print Dart version
33
+ run : dart --version
19
34
20
35
- name : Install dependencies
21
- run : pub get
36
+ run : dart pub get
22
37
23
38
- name : Analyze
39
+ if : ${{ matrix.sdk == 'stable' }}
24
40
run : dart analyze --fatal-infos --fatal-warnings
25
41
26
42
- name : Format code
43
+ if : ${{ matrix.sdk == 'stable' }}
27
44
run : dart format . --set-exit-if-changed
28
45
29
46
- name : Active coverage
30
- run : pub global activate coverage
47
+ run : dart pub global activate coverage
31
48
32
49
- name : Run tests
33
- run : pub run test test/rx_redux_test.dart
50
+ run : dart pub run test test/rx_redux_test.dart --chain-stack-traces
34
51
35
52
- name : Start Observatory
36
- run : dart --disable-service-auth-codes --enable-vm-service=8111 --pause-isolates-on-exit test/rx_redux_test.dart &
53
+ run : dart --disable-service-auth-codes --enable-vm-service=8111 --pause-isolates-on-exit --enable-asserts test/rx_redux_test.dart &
37
54
38
55
- name : Collect coverage
39
- run : nohup pub global run coverage:collect_coverage --port=8111 --out=coverage.json --wait-paused --resume-isolates
56
+ run : nohup dart pub global run coverage:collect_coverage --port=8111 --out=coverage.json --wait-paused --resume-isolates
40
57
41
58
- name : Format coverage
42
- run : pub global run coverage:format_coverage --lcov --in=coverage.json --out=lcov.info --packages=.packages --report-on=lib
59
+ run : dart pub global run coverage:format_coverage --lcov --in=coverage.json --out=lcov.info --report-on=lib
43
60
44
- - uses : codecov/codecov-action@v2 .1.0
61
+ - uses : codecov/codecov-action@v3 .1.0
0 commit comments