Flutter CI #735
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: Flutter CI | |
on: | |
push: | |
branches: [ master ] | |
paths-ignore: [ '**.md' ] | |
pull_request: | |
branches: [ master ] | |
paths-ignore: [ '**.md' ] | |
schedule: | |
# Runs at 02:00 UTC on the 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29 and 31th of every month. | |
- cron: "0 2 */2 * *" | |
jobs: | |
test-stable-beta: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
channel: [ 'stable', 'beta' ] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: subosito/flutter-action@v2.12.0 | |
with: | |
channel: ${{ matrix.channel }} | |
- name: Doctor | |
run: flutter doctor | |
- name: Install dependencies | |
run: flutter packages get | |
- name: Format | |
run: dart format lib test example --set-exit-if-changed | |
if: ${{ matrix.channel == 'stable' }} | |
- name: Analyze | |
run: flutter analyze lib test example | |
if: ${{ matrix.channel == 'stable' }} | |
- name: Run tests | |
run: flutter test --coverage --coverage-path=lcov.info | |
- uses: codecov/codecov-action@v3.1.2 | |
if: ${{ matrix.channel == 'stable' }} | |
test-old-versions: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
version: [ '3.3.0', '3.7.0' ] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: subosito/flutter-action@v2.12.0 | |
with: | |
flutter-version: ${{ matrix.version }} | |
- name: Doctor | |
run: flutter doctor | |
- name: Install dependencies | |
run: flutter packages get | |
- name: Run tests | |
run: flutter test |