bump version v0.18.0 #44
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, pull_request ] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| # Pinned to match the Flutter version used by the release pipeline. | |
| FLUTTER_VERSION: 3.38.10 | |
| jobs: | |
| test: | |
| # run job on all pushes OR external PR, not both | |
| if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name }} | |
| name: Analyze & test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: subosito/flutter-action@v2 | |
| with: | |
| flutter-version: ${{ env.FLUTTER_VERSION }} | |
| channel: stable | |
| cache: true | |
| - run: flutter --version | |
| - name: Install dependencies | |
| run: flutter pub get | |
| - name: Generate code (json_serializable) and check for diff | |
| run: | | |
| dart run build_runner build --delete-conflicting-outputs | |
| git diff --exit-code || { | |
| echo "::error::Generated files are out of date. Run 'dart run build_runner build --delete-conflicting-outputs' and commit the result."; | |
| exit 1; | |
| } | |
| - name: Format check | |
| run: dart format --output=none --set-exit-if-changed . | |
| - name: Static analysis | |
| run: flutter analyze --fatal-infos | |
| - name: Run tests with coverage | |
| run: flutter test --coverage | |
| - name: Upload coverage | |
| if: always() | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: coverage | |
| path: coverage/lcov.info | |
| if-no-files-found: warn | |
| build-web: | |
| # run job on all pushes OR external PR, not both | |
| if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name }} | |
| name: Build web | |
| runs-on: ubuntu-latest | |
| needs: test | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: subosito/flutter-action@v2 | |
| with: | |
| flutter-version: ${{ env.FLUTTER_VERSION }} | |
| channel: stable | |
| cache: true | |
| - name: Install dependencies | |
| run: flutter pub get | |
| - name: Build web release | |
| run: flutter build web --release --no-web-resources-cdn --pwa-strategy=none --csp | |
| - name: Upload web build | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: web-build | |
| path: build/web |