Skip to content

feat: Add support for Flutter 3.13, 3.16, 3.19; remove support for Flutter 3.3, 3.7 #1050

feat: Add support for Flutter 3.13, 3.16, 3.19; remove support for Flutter 3.3, 3.7

feat: Add support for Flutter 3.13, 3.16, 3.19; remove support for Flutter 3.3, 3.7 #1050

Workflow file for this run

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.1, Ubuntu
os: ubuntu-latest
sdk: 3.1.2
- name: Dart 3.1, macOS
os: macos-latest
sdk: 3.1.2
- name: Dart 3.1, Windows
os: windows-latest
sdk: 3.1.2
# Older Dart framework versions (below) are only tested with Ubuntu to reduce CI resource usage.
- name: Dart 3.0
os: ubuntu-latest
sdk: 3.0.7
- name: Dart 2.19
os: ubuntu-latest
sdk: 2.19.6
- 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@v2
# 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
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@v2
# 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
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true