feat: Add support for Flutter 3.13
, 3.16
, 3.19
; remove support for Flutter 3.3
, 3.7
#1066
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ci | |
on: | |
push: | |
branches: | |
- "master" | |
paths-ignore: | |
- "**/README.md" | |
pull_request: | |
branches: | |
- "**" | |
jobs: | |
check-dart: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
include: | |
# Dart framework may contain breaking changes in minor version releases, not following semver. | |
# The latest Dart framework (below) is tested on all architectures (Ubuntu, macOS, Windows). | |
- name: Dart 3.3, Ubuntu | |
os: ubuntu-latest | |
sdk: 3.3.3 | |
- name: Dart 3.3, macOS | |
os: macos-latest | |
sdk: 3.3.3 | |
- name: Dart 3.3, Windows | |
os: windows-latest | |
sdk: 3.3.3 | |
# Older Dart framework versions (below) are only tested with Ubuntu to reduce CI resource usage. | |
- name: Dart 3.2 | |
os: ubuntu-latest | |
sdk: 3.2.6 | |
- name: Dart 3.1 | |
os: ubuntu-latest | |
sdk: 3.1.5 | |
- name: Dart 3.0 | |
os: ubuntu-latest | |
sdk: 3.0.7 | |
- name: Dart beta | |
os: ubuntu-latest | |
sdk: beta | |
fail-fast: false | |
name: Test ${{ matrix.name }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup dart | |
uses: dart-lang/setup-dart@v1.5.0 | |
with: | |
sdk: ${{ matrix.sdk }} | |
- name: Install dependencies | |
run: dart pub get --directory packages/dart | |
- name: Run build_runner | |
run: (cd packages/dart && dart run build_runner build --delete-conflicting-outputs) | |
- name: Analyze code | |
run: dart analyze packages/dart --fatal-infos | |
- name: Lint | |
run: dart format --output=none --set-exit-if-changed packages/dart | |
- name: Publish dry run | |
run: cd packages/dart && dart pub publish --dry-run | |
- name: Run tests | |
run: (cd packages/dart && dart test --coverage=coverage) | |
- name: Convert code coverage | |
# Needs to be adapted to collect the coverage at all platforms if platform specific code is added. | |
if: ${{ always() && matrix.os == 'ubuntu-latest' }} | |
working-directory: packages/dart | |
run: | | |
dart pub global activate coverage | |
dart pub global run coverage:format_coverage -i coverage/test -o coverage/lcov.info --lcov --packages=.dart_tool/package_config.json --report-on=lib | |
- name: Upload code coverage | |
uses: codecov/codecov-action@v4 | |
# Needs to be adapted to collect the coverage at all platforms if platform specific code is added. | |
if: ${{ always() && matrix.os == 'ubuntu-latest' }} | |
with: | |
files: packages/dart/coverage/lcov.info | |
fail_ci_if_error: true | |
token: ${{ secrets.CODECOV_TOKEN }} | |
check-flutter: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
include: | |
# Flutter framework may contain breaking changes in minor version releases, not following semver. | |
# The latest Flutter framework (below) is tested on all architectures (Ubuntu, macOS, Windows). | |
- name: Flutter 3.19, Ubuntu | |
os: ubuntu-latest | |
sdk: 3.19.5 | |
- name: Flutter 3.19, macOS | |
os: macos-latest | |
sdk: 3.19.5 | |
- name: Flutter 3.19, Windows | |
os: windows-latest | |
sdk: 3.19.5 | |
# Older Flutter framework versions (below) are only tested with Ubuntu to reduce CI resource usage. | |
- name: Flutter 3.16 | |
os: ubuntu-latest | |
sdk: 3.16.9 | |
- name: Flutter 3.13 | |
os: ubuntu-latest | |
sdk: 3.13.9 | |
- name: Flutter 3.10 | |
os: ubuntu-latest | |
sdk: 3.10.6 | |
- name: Flutter beta | |
os: ubuntu-latest | |
sdk: beta | |
fail-fast: false | |
name: Test ${{ matrix.name }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup flutter (beta) | |
if: ${{ matrix.sdk == 'beta' }} | |
uses: subosito/flutter-action@v2 | |
with: | |
channel: "beta" | |
cache: true | |
- name: Setup flutter | |
if: ${{ matrix.sdk != 'beta' }} | |
uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: ${{ matrix.sdk }} | |
cache: true | |
- name: Install dependencies on Ubuntu and MacOS | |
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest' | |
run: (cd packages/flutter && flutter pub get) | |
- name: Install dependencies on Windows | |
if: matrix.os == 'windows-latest' | |
run: cmd /c "cd packages\flutter && flutter pub get" | |
- name: Analyze code | |
run: flutter analyze packages/flutter --fatal-infos | |
- name: Lint | |
run: dart format --output=none --set-exit-if-changed packages/flutter | |
- name: Publish dry run | |
run: cd packages/flutter && dart pub publish --dry-run | |
- name: Run tests | |
run: (cd packages/flutter && flutter test --coverage) | |
- name: Convert code coverage | |
# Needs to be adapted to collect the coverage at all platforms if platform specific code is added. | |
if: ${{ always() && matrix.os == 'ubuntu-latest' }} | |
working-directory: packages/flutter | |
run: | | |
escapedPath="$(echo `pwd` | sed 's/\//\\\//g')" | |
sed "s/^SF:lib/SF:$escapedPath\/lib/g" coverage/lcov.info > coverage/lcov-full.info | |
- name: Upload code coverage | |
uses: codecov/codecov-action@v4 | |
# Needs to be adapted to collect the coverage at all platforms if platform specific code is added. | |
if: ${{ always() && matrix.os == 'ubuntu-latest' }} | |
with: | |
files: packages/flutter/coverage/lcov-full.info | |
fail_ci_if_error: true | |
token: ${{ secrets.CODECOV_TOKEN }} | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true |