capture and validate Stripe Checkout screenshots #74
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: Flutter Test | |
| # Runs the Dart unit/widget suite (test/) on PRs that touch Dart source. Until | |
| # now nothing ran it: every other `flutter test` call in this repo targets | |
| # integration_test/, and all of them sit behind workflow_call (build-linux.yml, | |
| # build-windows.yml) or workflow_dispatch. So no PR-triggered workflow executed | |
| # a single Dart test, and a regression pinned by a unit test could still merge. | |
| # | |
| # That gap is not hypothetical — lantern-box v0.0.101 changed the JSON shape of | |
| # `user_failures` and broke Dart deserialization for every user with a recorded | |
| # failure (#8929). The fix ships with tests, but on `pull_request` nothing would | |
| # have run them. | |
| # | |
| # No Go toolchain, Android SDK, or Java here: `flutter test` runs on the Dart VM | |
| # and builds no platform artifact, which keeps this gate to a couple of minutes. | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| paths: | |
| - "lib/**" | |
| - "test/**" | |
| - "pubspec.yaml" | |
| - "pubspec.lock" | |
| - ".github/flutter-version.yaml" | |
| # keep the self-trigger so edits to this workflow re-run it | |
| - ".github/workflows/flutter-test.yml" | |
| concurrency: | |
| group: flutter-test-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| flutter-test: | |
| permissions: | |
| contents: "read" | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Cache Flutter dependencies | |
| uses: actions/cache@v4 | |
| timeout-minutes: 5 | |
| continue-on-error: true | |
| with: | |
| path: | | |
| ~/.pub-cache | |
| key: ${{ runner.os }}-flutter-${{ hashFiles('**/pubspec.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-flutter- | |
| - name: Install Flutter | |
| uses: subosito/flutter-action@v2.22.0 | |
| with: | |
| channel: stable | |
| flutter-version-file: .github/flutter-version.yaml | |
| cache: true | |
| # Generated sources are committed, but regenerating means the suite tests | |
| # the PR's own source rather than whatever .g.dart happened to be checked | |
| # in — a model change with a forgotten `make gen` would otherwise pass | |
| # against stale generated code. | |
| - name: Flutter pub get + codegen | |
| run: | | |
| make pubget | |
| make gen | |
| # app.env is a declared pubspec asset, normally decoded from a secret by | |
| # the release workflow. Asset bundling runs before the tests do and fails | |
| # outright if the file is absent, so an empty placeholder is enough — the | |
| # suite reads nothing from it. Same treatment as android-compile-check.yml. | |
| - name: Create placeholder app.env | |
| run: touch app.env | |
| # Reporter is left unset: the Dart test runner defaults to its `github` | |
| # reporter under Actions, which annotates failures inline on the PR. | |
| - name: Run Flutter tests | |
| run: flutter test |