Improve pub.dev score to 160/160 #8
Workflow file for this run
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
| name: CI | |
| on: | |
| push: | |
| branches: [master] | |
| pull_request: | |
| branches: [master] | |
| jobs: | |
| package: | |
| name: Analyze & test (package) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: subosito/flutter-action@v2 | |
| with: | |
| channel: stable | |
| cache: true | |
| - name: Install dependencies | |
| run: flutter pub get | |
| - name: Verify generated code is up to date | |
| run: | | |
| dart run build_runner build | |
| if ! git diff --quiet; then | |
| echo "::error::Generated *.g.dart files are out of date. Run: dart run build_runner build" | |
| git --no-pager diff --stat | |
| exit 1 | |
| fi | |
| - name: Verify formatting | |
| run: dart format --output=none --set-exit-if-changed lib test | |
| - name: Analyze | |
| run: dart analyze --fatal-infos --fatal-warnings | |
| - name: Test | |
| run: flutter test | |
| example: | |
| name: Analyze (example) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: subosito/flutter-action@v2 | |
| with: | |
| channel: stable | |
| cache: true | |
| - name: Create example secret | |
| working-directory: example | |
| run: cp lib/secret.dart.example lib/secret.dart | |
| - name: Install dependencies | |
| working-directory: example | |
| run: flutter pub get | |
| - name: Analyze | |
| working-directory: example | |
| run: flutter analyze |