Skip to content

Commit 2464d86

Browse files
authored
Added matrix builds to build across channels. (#601)
* Added matrix builds to build across channels. * Added strict code quality checking to CI builds (must pass analyze and formatting). * Skip redundant `package get` from Analyze step too. * Removed version from example `pubspec.yaml` since it does not apply. * Added `dry-run` switch to `flutter format` since we only need to detect formatting issue.
1 parent b2b2065 commit 2464d86

File tree

3 files changed

+17
-9
lines changed

3 files changed

+17
-9
lines changed

.github/workflows/main.yml

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,27 @@
22

33
name: CI
44

5-
# Controls when the action will run. Triggers the workflow on push or pull request
6-
# events but only for the master branch
5+
# Controls when the action will run.
76
on:
7+
# Triggers the workflow on push or pull request events but only for the master branch
88
push:
99
branches: [master]
1010
pull_request:
1111
branches: [master]
1212

13+
# Allows you to run this workflow manually from the Actions tab
14+
workflow_dispatch:
15+
1316
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
1417
jobs:
1518
# This workflow contains a single job called "build"
1619
build:
1720
# The type of runner that the job will run on
1821
runs-on: macos-latest
22+
strategy:
23+
fail-fast: false
24+
matrix:
25+
channel: [stable, beta, dev]
1926

2027
# Steps represent a sequence of tasks that will be executed as part of the job
2128
steps:
@@ -25,14 +32,16 @@ jobs:
2532
- name: Flutter action
2633
uses: subosito/flutter-action@v1
2734
with:
28-
channel: stable
35+
channel: ${{ matrix.channel }}
2936

3037
- name: Run Tests
3138
run: |
3239
flutter pub get
33-
flutter test --coverage
34-
40+
flutter format --dry-run --set-exit-if-changed .
41+
flutter analyze --no-pub
42+
flutter test --no-pub --coverage
3543
- name: Upload coverage to Codecov
44+
if: ${{ matrix.channel == 'stable' }}
3645
uses: codecov/codecov-action@v1
3746
with:
3847
file: coverage/lcov.info

example/pubspec.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
name: example
22
description: A flutter_form_builder example project.
33

4-
version: 1.0.0+1
5-
64
environment:
7-
sdk: ">=2.6.0 <3.0.0"
5+
sdk: ">=2.10.0 <3.0.0"
6+
flutter: ">=1.22.0"
87

98
dependencies:
109
flutter:

test/fields/form_builder_typeahead_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ void main() {
3636
}
3737
},
3838
);
39-
final widgetFinder = find.byWidget(testWidget);
39+
// final widgetFinder = find.byWidget(testWidget);
4040

4141
await tester.pumpWidget(buildTestableFieldWidget(testWidget));
4242
expect(formSave(), isTrue);

0 commit comments

Comments
 (0)