ci: speed up build and test pipelines#1524
Merged
Merged
Conversation
- build.yml: cache pub dependencies and Gradle, and split the Flutter builds into per-target parallel jobs so web, linux, apk, macos, ios and windows run concurrently instead of serially per OS. - test.yml: only run the beta/dev Dart SDK matrix on pushes to main; pull requests test stable only to keep the matrix small. - Pin melos to 8.0.0 across all workflows for reproducible, cacheable runs.
mandarini
approved these changes
Jul 3, 2026
spydon
added a commit
that referenced
this pull request
Jul 3, 2026
> **Stacked on #1527.** Review/merge that one first. This PR targets `chore/bump-min-dart-3.9` and its diff shows only the workspace/Melos changes; the Dart 3.9 SDK bump, reformat, and analyzer fixes live in the base PR. ## What Migrates the monorepo from Melos 3 (`melos.yaml` + `pubspec_overrides.yaml` linking) to [Dart pub workspaces](https://dart.dev/tools/pub/workspaces) with the latest Melos (8.1.0), following the [Melos migration guide](https://melos.invertase.dev/guides/migrations) and mirroring how [flame](https://github.com/flame-engine/flame/blob/main/pubspec.yaml) is set up. ## Changes - **Root `pubspec.yaml`** now holds the workspace: a literal `workspace:` member list (globs would require Dart 3.11, we target 3.9), `dev_dependencies: melos: ^8.1.0`, and the Melos config moved under the `melos:` key. `melos.yaml` is deleted. - **Every member** declares `resolution: workspace`, so pub links the local packages automatically. `pubspec_overrides.yaml` and `runPubGetInParallel`/`usePubspecOverrides` are gone. - **All examples are workspace members**, including `examples/launcher`. Launcher was previously excluded because the old minimum Flutter shipped a Dart older than launcher required; now that the whole workspace is on Dart 3.9 it joins like the rest (bumped to `>=3.9.0`, `resolution: workspace`). - **Built-in commands**: drops the hand-written `analyze`/`format`/`lint:all`/`test:coverage`/`upgrade`/`outdated` scripts in favor of the built-in `melos analyze`, `melos format` (line length configured in the `melos:` block) and `melos test`. Only the `update-version` script (used by the version hook) remains. - **CI**: the Dart test matrix can no longer use `melos bootstrap --no-flutter` (removed in Melos, and `resolution: workspace` resolves the whole workspace at once, which includes `supabase_flutter` and therefore requires Flutter). It now uses the Flutter `stable`/`beta`/`master` channels, which bundle Dart `stable`/`beta`/`dev`, preserving multi-channel coverage (beta/master only on push to main, as #1524 set up). Affected-package detection now watches the root `pubspec.yaml`. Melos stays unpinned (the action/CLI install the latest, which supports workspaces). - **passkeys example**: updated to pass a `PasskeyAuthenticator`, matching the current `supabase_flutter` API (a pre-existing break from #1444 that CI never covered, surfaced now that `melos analyze` runs the whole workspace). ## Validation Locally with Melos 8.1.0 and Flutter 3.44 (Dart 3.12): - `melos bootstrap` resolves the whole workspace with a single `flutter pub get` (13 packages). - `melos analyze --fatal-infos` is green across all packages. - `melos format --set-exit-if-changed` is clean. - `melos test` runs (verified on a backend-free package).
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Several changes to cut CI wall-clock time on
build.ymlandtest.yml.build.ymlPUB_CACHE) and the Gradle caches/wrapper for the Android build. The Flutter SDK cache stays off (cache: false) as before due to the known flakiness with latest stable.web,linux,apk,macos,ios, andwindowseach run as their own matrix job concurrently.test.ymlmain. Pull requests now teststableonly, cutting the Dart test job count by ~66% per PR. Upcoming-SDK breakage is still caught on merge to main. Driven by a newsdk-matrixoutput from the detect job.Trade-offs
Follow-up