1111 branches :
1212 - " **"
1313jobs :
14- check-lint-flutter :
15- name : Lint (flutter)
16- timeout-minutes : 5
17- runs-on : ubuntu-latest
18- steps :
19- - name : Checkout code
20- uses : actions/checkout@v3
21- - name : Setup flutter
22- uses : subosito/flutter-action@v2
23- with :
24- cache : true
25- - name : Lint
26- run : flutter format --output=none --set-exit-if-changed packages/flutter
27- check-lint-dart :
28- name : Lint (dart)
29- timeout-minutes : 5
30- runs-on : ubuntu-latest
14+ check-dart :
15+ runs-on : ${{ matrix.os }}
16+ strategy :
17+ matrix :
18+ include :
19+ # Dart framework may contain breaking changes in minor version releases, not following semver.
20+ - name : Dart 3.0, Ubuntu
21+ os : ubuntu-latest
22+ sdk : 3.0.0
23+ - name : Dart 3.0, macOS
24+ os : macos-latest
25+ sdk : 3.0.0
26+ - name : Dart 3.0, Windows
27+ os : windows-latest
28+ sdk : 3.0.0
29+ # Only the latest Dart framework version (above) is tested with all architectures. Previous
30+ # Dart framework versions (below) are only tested with Ubuntu to reduce CI resource usage.
31+ - name : Dart 2.19
32+ os : ubuntu-latest
33+ sdk : 2.19.6
34+ - name : Dart 2.18
35+ os : ubuntu-latest
36+ sdk : 2.18.7
37+ fail-fast : false
38+ name : Test ${{ matrix.name }}
3139 steps :
3240 - name : Checkout code
3341 uses : actions/checkout@v3
3442 - name : Setup dart
35- uses : dart-lang/setup-dart@v1
36- - name : Lint
37- run : dart format --output=none --set-exit-if-changed packages/dart
38- check-code-analysis-flutter :
39- name : Code analysis (flutter)
40- timeout-minutes : 5
41- runs-on : ubuntu-latest
42- steps :
43- - name : Checkout code
44- uses : actions/checkout@v3
45- - name : Setup flutter
46- uses : subosito/flutter-action@v2
43+ 4744 with :
48- cache : true
49- - name : Install dependencies
50- run : |
51- (cd packages/dart && flutter pub get)
52- (cd packages/flutter && flutter pub get)
53- - name : Analyze code
54- run : flutter analyze packages/flutter --no-fatal-infos
55- check-code-analysis-dart :
56- name : Code analysis (dart)
57- timeout-minutes : 5
58- runs-on : ubuntu-latest
59- steps :
60- - name : Checkout code
61- uses : actions/checkout@v3
62- - name : Setup dart
63- uses : dart-lang/setup-dart@v1
45+ sdk : ${{ matrix.sdk }}
6446 - name : Install dependencies
6547 run : dart pub get --directory packages/dart
48+ - name : Run build_runner
49+ run : (cd packages/dart && dart run build_runner build --delete-conflicting-outputs)
6650 - name : Analyze code
6751 run : dart analyze packages/dart
68- check-publish-dry-run-dart :
69- name : publish dry-run (dart)
70- timeout-minutes : 5
71- runs-on : ubuntu-latest
72- steps :
73- - name : Checkout code
74- uses : actions/checkout@v3
75- - name : Setup dart
76- uses : dart-lang/setup-dart@v1
77- - name : publish dry run
52+ - name : Lint
53+ run : dart format --output=none --set-exit-if-changed packages/dart
54+ - name : Publish dry run
7855 run : cd packages/dart && dart pub publish --dry-run
79- check-publish-dry-run-flutter :
80- name : publish dry-run (flutter)
81- timeout-minutes : 5
82- runs-on : ubuntu-latest
83- steps :
84- - name : Checkout code
85- uses : actions/checkout@v3
86- - name : Setup flutter
87- uses : subosito/flutter-action@v2
56+ - name : Run tests
57+ run : (cd packages/dart && dart test --coverage=coverage)
58+ - name : Convert code coverage
59+ # Needs to be adapted to collect the coverage at all platforms if platform specific code is added.
60+ if : ${{ always() && matrix.os == 'ubuntu-latest' }}
61+ working-directory : packages/dart
62+ run : |
63+ dart pub global activate coverage
64+ dart pub global run coverage:format_coverage -i coverage/test -o coverage/lcov.info --lcov --packages=.dart_tool/package_config.json --report-on=lib
65+ - name : Upload code coverage
66+ uses : codecov/codecov-action@v2
67+ # Needs to be adapted to collect the coverage at all platforms if platform specific code is added.
68+ if : ${{ always() && matrix.os == 'ubuntu-latest' }}
8869 with :
89- cache : true
90- - name : publish dry run
91- run : cd packages/flutter && dart pub publish --dry-run
70+ files : packages/dart/coverage/lcov.info
71+ fail_ci_if_error : true
9272 check-flutter :
9373 runs-on : ${{ matrix.os }}
9474 strategy :
9575 matrix :
96- os : [ubuntu-latest, macos-latest, windows-latest]
76+ include :
77+ # Flutter framework may contain breaking changes in minor version releases, not following semver.
78+ - name : Flutter 3.10, Ubuntu
79+ os : ubuntu-latest
80+ sdk : 3.10.x
81+ - name : Flutter 3.10, macOS
82+ os : macos-latest
83+ sdk : 3.10.x
84+ - name : Flutter 3.10, Windows
85+ os : windows-latest
86+ sdk : 3.10.x
87+ # Only the latest Flutter framework version (above) is tested with all architectures. Previous
88+ # Flutter framework versions (below) are only tested with Ubuntu to reduce CI resource usage.
89+ - name : Flutter 3.7
90+ os : ubuntu-latest
91+ sdk : 3.7.x
92+ - name : Flutter 3.3
93+ os : ubuntu-latest
94+ sdk : 3.3.x
9795 fail-fast : false
98- name : Test flutter ( ${{ matrix.os }})
96+ name : Test ${{ matrix.name }}
9997 steps :
10098 - name : Checkout code
10199 uses : actions/checkout@v3
102100 - name : Setup flutter
103101 uses : subosito/flutter-action@v2
104102 with :
103+ flutter-version : ${{ matrix.sdk }}
105104 cache : true
106105 - name : Install dependencies on Ubuntu and MacOS
107106 if : matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
@@ -113,6 +112,12 @@ jobs:
113112 run : |
114113 cmd /c "cd packages\dart && flutter pub get"
115114 cmd /c "cd packages\flutter && flutter pub get"
115+ - name : Analyze code
116+ run : flutter analyze packages/flutter --no-fatal-infos
117+ - name : Lint
118+ run : dart format --output=none --set-exit-if-changed packages/flutter
119+ - name : Publish dry run
120+ run : cd packages/flutter && dart pub publish --dry-run
116121 - name : Run tests
117122 run : (cd packages/flutter && flutter test --coverage)
118123 - name : Convert code coverage
@@ -129,38 +134,6 @@ jobs:
129134 with :
130135 files : packages/flutter/coverage/lcov-full.info
131136 fail_ci_if_error : true
132- check-dart :
133- runs-on : ${{ matrix.os }}
134- strategy :
135- matrix :
136- os : [ubuntu-latest, macos-latest, windows-latest]
137- fail-fast : false
138- name : Test dart (${{ matrix.os }})
139- steps :
140- - name : Checkout code
141- uses : actions/checkout@v3
142- - name : Setup dart
143- uses : dart-lang/setup-dart@v1
144- - name : Install dependencies
145- run : dart pub get --directory packages/dart
146- - name : Run build_runner
147- run : (cd packages/dart && dart run build_runner build --delete-conflicting-outputs)
148- - name : Run tests
149- run : (cd packages/dart && dart test --coverage=coverage)
150- - name : Convert code coverage
151- # Needs to be adapted to collect the coverage at all platforms if platform specific code is added.
152- if : ${{ always() && matrix.os == 'ubuntu-latest' }}
153- working-directory : packages/dart
154- run : |
155- dart pub global activate coverage
156- dart pub global run coverage:format_coverage -i coverage/test -o coverage/lcov.info --lcov --packages=.dart_tool/package_config.json --report-on=lib
157- - name : Upload code coverage
158- uses : codecov/codecov-action@v2
159- # Needs to be adapted to collect the coverage at all platforms if platform specific code is added.
160- if : ${{ always() && matrix.os == 'ubuntu-latest' }}
161- with :
162- files : packages/dart/coverage/lcov.info
163- fail_ci_if_error : true
164137concurrency :
165138 group : ${{ github.workflow }}-${{ github.ref }}
166139 cancel-in-progress : true
0 commit comments