it works #1317
This file contains hidden or 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
| # This workflow uses actions that are not certified by GitHub. | |
| # They are provided by a third-party and are governed by | |
| # separate terms of service, privacy policy, and support | |
| # documentation. | |
| name: Flutter build and test | |
| on: push | |
| env: | |
| FLUTTER_FOLDER: '$HOME/flutter' | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Cache Flutter | |
| id: cache-flutter | |
| uses: actions/cache@v3 | |
| with: | |
| path: | | |
| flutter | |
| ~/.pub-cache | |
| key: flutter-${{ hashFiles('**/pubspec.lock') }} | |
| - name: Setup Flutter SDK | |
| uses: flutter-actions/setup-flutter@v4 | |
| with: | |
| channel: stable | |
| version: 3.32.1 | |
| - name: Install dependencies | |
| run: flutter pub get | |
| - name: Verify formatting | |
| run: dart format --output=none --set-exit-if-changed lib/** test/** | |
| - name: Analyze project source | |
| run: flutter analyze --no-fatal-infos --no-fatal-warnings lib/ test/ | |
| - name: Run tests | |
| run: flutter test |