Flutter CI #21
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: [main] | |
pull_request: | |
branches: [main] | |
workflow_dispatch: | |
schedule: | |
- cron: "0 0 * * *" # Every day at midnight | |
jobs: | |
lint-and-test: | |
name: Test Flutter ${{ matrix.flutter_version }} | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
flutter_version: [stable, beta] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Flutter | |
uses: subosito/flutter-action@f2c4f6686ca8e8d6e6d0f28410eeef506ed66aff | |
with: | |
channel: ${{ matrix.flutter_version }} | |
- run: dart --version | |
- run: flutter --version | |
- run: flutter pub get | |
- name: Lint analysis | |
run: dart analyze | |
- name: Dart format | |
run: dart format --output none --set-exit-if-changed . | |
- name: dart fix | |
run: dart fix --dry-run | |
- name: Run tests | |
run: flutter test | |
- name: Check API docs can generate | |
run: dart doc --dry-run |