Skip to content

Commit 70a3b70

Browse files
authored
ci: Add Dart / Flutter version matrix (#874)
1 parent d7339cd commit 70a3b70

File tree

3 files changed

+119
-101
lines changed

3 files changed

+119
-101
lines changed

.github/workflows/ci.yml

Lines changed: 94 additions & 101 deletions
Original file line numberDiff line numberDiff line change
@@ -11,97 +11,116 @@ on:
1111
branches:
1212
- "**"
1313
jobs:
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 SDK may contain breaking changes in minor version releases, i.e. it doesn't
20+
# follow semver, see
21+
- name: Dart 3.0, Ubuntu
22+
os: ubuntu-latest
23+
sdk: 3.0.0
24+
- name: Dart 3.0, macOS
25+
os: macos-latest
26+
sdk: 3.0.0
27+
- name: Dart 3.0, Windows
28+
os: windows-latest
29+
sdk: 3.0.0
30+
# Only the latest Dart SDK version (above) is tested with all architectures. Previous
31+
# Dart SDK versions (below) are only tested with Ubuntu to reduce CI resource usage.
32+
- name: Dart 2.19
33+
os: ubuntu-latest
34+
sdk: 2.19.6
35+
- name: Dart 2.18
36+
os: ubuntu-latest
37+
sdk: 2.18.7
38+
- name: Dart 2.17
39+
os: ubuntu-latest
40+
sdk: 2.17.7
41+
- name: Dart 2.16
42+
os: ubuntu-latest
43+
sdk: 2.16.2
44+
- name: Dart 2.15
45+
os: ubuntu-latest
46+
sdk: 2.15.1
47+
- name: Dart 2.14
48+
os: ubuntu-latest
49+
sdk: 2.14.4
50+
- name: Dart 2.13
51+
os: ubuntu-latest
52+
sdk: 2.13.4
53+
- name: Dart 2.12
54+
os: ubuntu-latest
55+
sdk: 2.12.4
56+
fail-fast: false
57+
name: Test ${{ matrix.name }}
3158
steps:
3259
- name: Checkout code
3360
uses: actions/checkout@v3
3461
- 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
62+
uses: dart-lang/setup-dart@v1.5.0
4763
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
64+
sdk: ${{ matrix.sdk }}
6465
- name: Install dependencies
6566
run: dart pub get --directory packages/dart
67+
- name: Run build_runner
68+
run: (cd packages/dart && dart run build_runner build --delete-conflicting-outputs)
6669
- name: Analyze code
6770
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
71+
- name: Lint
72+
run: dart format --output=none --set-exit-if-changed packages/dart
73+
- name: Publish dry run
7874
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
75+
- name: Run tests
76+
run: (cd packages/dart && dart test --coverage=coverage)
77+
- name: Convert code coverage
78+
# Needs to be adapted to collect the coverage at all platforms if platform specific code is added.
79+
if: ${{ always() && matrix.os == 'ubuntu-latest' }}
80+
working-directory: packages/dart
81+
run: |
82+
dart pub global activate coverage
83+
dart pub global run coverage:format_coverage -i coverage/test -o coverage/lcov.info --lcov --packages=.dart_tool/package_config.json --report-on=lib
84+
- name: Upload code coverage
85+
uses: codecov/codecov-action@v2
86+
# Needs to be adapted to collect the coverage at all platforms if platform specific code is added.
87+
if: ${{ always() && matrix.os == 'ubuntu-latest' }}
8888
with:
89-
cache: true
90-
- name: publish dry run
91-
run: cd packages/flutter && dart pub publish --dry-run
89+
files: packages/dart/coverage/lcov.info
90+
fail_ci_if_error: true
9291
check-flutter:
9392
runs-on: ${{ matrix.os }}
9493
strategy:
9594
matrix:
96-
os: [ubuntu-latest, macos-latest, windows-latest]
95+
include:
96+
# Dart SDK may contain breaking changes in minor version releases, i.e. it doesn't
97+
# follow semver, see
98+
- name: Flutter 3.10, Ubuntu
99+
os: ubuntu-latest
100+
sdk: 3.10.x
101+
- name: Flutter 3.10, macOS
102+
os: macos-latest
103+
sdk: 3.10.x
104+
- name: Flutter 3.10, Windows
105+
os: windows-latest
106+
sdk: 3.10.x
107+
# Only the latest Flutter SDK version (above) is tested with all architectures. Previous
108+
# Flutter SDK versions (below) are only tested with Ubuntu to reduce CI resource usage.
109+
- name: Flutter 3.7
110+
os: ubuntu-latest
111+
sdk: 3.7.x
112+
- name: Flutter 3.3
113+
os: ubuntu-latest
114+
sdk: 3.3.x
97115
fail-fast: false
98-
name: Test flutter (${{ matrix.os }})
116+
name: Test ${{ matrix.name }}
99117
steps:
100118
- name: Checkout code
101119
uses: actions/checkout@v3
102120
- name: Setup flutter
103121
uses: subosito/flutter-action@v2
104122
with:
123+
flutter-version: ${{ matrix.sdk }}
105124
cache: true
106125
- name: Install dependencies on Ubuntu and MacOS
107126
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
@@ -113,6 +132,12 @@ jobs:
113132
run: |
114133
cmd /c "cd packages\dart && flutter pub get"
115134
cmd /c "cd packages\flutter && flutter pub get"
135+
- name: Analyze code
136+
run: flutter analyze packages/flutter --no-fatal-infos
137+
- name: Lint
138+
run: dart format --output=none --set-exit-if-changed packages/flutter
139+
- name: Publish dry run
140+
run: cd packages/flutter && dart pub publish --dry-run
116141
- name: Run tests
117142
run: (cd packages/flutter && flutter test --coverage)
118143
- name: Convert code coverage
@@ -129,38 +154,6 @@ jobs:
129154
with:
130155
files: packages/flutter/coverage/lcov-full.info
131156
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
164157
concurrency:
165158
group: ${{ github.workflow }}-${{ github.ref }}
166159
cancel-in-progress: true

packages/dart/README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ This library gives you access to the powerful Parse Server backend from your Dar
66

77
---
88

9+
- [Compatibility](#compatibility)
910
- [Getting Started](#getting-started)
1011
- [Early Web support](#early-web-support)
1112
- [Objects](#objects)
@@ -35,6 +36,17 @@ This library gives you access to the powerful Parse Server backend from your Dar
3536

3637
---
3738

39+
## Compatibility
40+
41+
The Parse Dart SDK is continuously tested with the most recent release of the Dart framework to ensure compatibility. To give developers time to upgrade their app to the newest Dart framework, previous Dart framework releases are supported for at least 1 year after their [release date](https://dart.dev/get-dart/archive).
42+
43+
| Version | Latest Version | End of Support | Compatible |
44+
|-----------|----------------|----------------|----------------------------------------------|
45+
| Dart 3.0 | 3.0.0 | May 2024 | ✅ Yes |
46+
| Dart 2.19 | 2.19.6 | Mar 2024 | ✅ Yes |
47+
| Dart 2.18 | 2.18.7 | Jan 2024 | ✅ Yes |
48+
| Dart 2.17 | 2.17.7 | Aug 2023 | ❌ No (Parse Dart SDK requires Dart >=2.18.0) |
49+
3850
## Getting Started
3951

4052
To install, either add [dependency in your pubspec.yaml file](https://pub.dev/packages/parse_server_sdk/install).

packages/flutter/README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,10 @@ This library gives you access to the powerful Parse Server backend from your Flu
66

77
---
88

9+
- [Compatibility](#compatibility)
910
- [Getting Started](#getting-started)
1011
- [Web support](#web-support)
12+
- [Desktop Support (macOS)](#desktop-support-macos)
1113
- [Network client](#network-client)
1214
- [Objects](#objects)
1315
- [Custom Objects](#custom-objects)
@@ -37,6 +39,17 @@ This library gives you access to the powerful Parse Server backend from your Flu
3739

3840
---
3941

42+
## Compatibility
43+
44+
The Parse Flutter SDK is continuously tested with the most recent release of the Flutter framework to ensure compatibility. To give developers time to upgrade their app to the newest Flutter framework, previous Flutter framework releases are supported for at least 1 year after their [release date](https://docs.flutter.dev/release/archive?tab=linux). The Parse Flutter SDK depends on the Parse Dart SDK which may require a higher Dart framework version than the Flutter framework version, in which case the Flutter framework version cannot be supported even though its release date may have been less than a year ago.
45+
46+
| Version | End of Support | Compatible |
47+
|--------------|----------------|----------------------------------------------|
48+
| Flutter 3.10 | May 2024 | ❌ No |
49+
| Flutter 3.7 | Apr 2024 | ✅ Yes |
50+
| Flutter 3.3 | Jan 2024 | ❌ No |
51+
| Flutter 3.0 | Jul 2023 | ❌ No (Parse Dart SDK requires Dart >=2.18.0) |
52+
4053
## Getting Started
4154

4255
To install add the dependency to your [pubspec.yaml](https://pub.dev/packages/parse_server_sdk_flutter/install) file.

0 commit comments

Comments
 (0)