Skip to content

ci: add GitHub Actions workflow - #8

Merged
onamfc merged 4 commits into
mainfrom
ci/flutter-workflow
Sep 10, 2026
Merged

ci: add GitHub Actions workflow#8
onamfc merged 4 commits into
mainfrom
ci/flutter-workflow

Conversation

@onamfc

@onamfc onamfc commented Aug 15, 2026

Copy link
Copy Markdown
Member

This repo has no CI, so pull requests merge unverified — the iOS and Android SDK repos both gate on tests and lint. Noticed while porting the deepLinkData fix (#7), which reported no checks.

The workflow

Four jobs, mirroring the other SDK repos:

Job What it runs
Unit Tests flutter test --coverage, uploads lcov.info
Analyze flutter analyze + dart format --set-exit-if-changed
Generated Code rebuilds with build_runner and fails if committed *.g.dart differs
Package flutter pub publish --dry-run, gated behind the other three

The Generated Code job is the one that isn't just parity with the other repos: the *.g.dart files are committed, so a model change without a rebuild would silently ship stale serialization — exactly the layer #7 touches.

Uses subosito/flutter-action@v2 on the stable channel with caching — the standard action for Flutter CI, and the closest analogue to gradle/actions/setup-gradle in the Android repo.

The analysis_options commit

The first run failed the Package job, and the cause was real rather than a workflow bug: CI's Flutter (3.47) rewrites analysis_options.yaml on pub get to exclude the build and platform directories, which dirties the tree and trips the publish validator's clean-git-state check. Local dev on 3.44 never sees it.

So the first commit here just commits that migration — the state a current stable SDK wants — rather than pinning CI to an older Flutter to hide it. Both files get the same block the tool generates; nothing else changes, and flutter analyze is still clean on 3.44.

Verification

All four jobs pass on this branch. Locally: 106 tests, analyze clean, dart format reports 0 of 68 files changed, build_runner reproduces lib/ byte-for-byte, publish dry-run 0 warnings.

Worth merging before #7 so that PR picks up checks (it'll need a push or re-run to trigger them).

onamfc added 2 commits August 15, 2026 14:48
Flutter 3.47 rewrites `analysis_options.yaml` on `pub get` to exclude the
build and platform directories, which leaves a dirty tree on any machine
running a current stable SDK. Commit the migrated files so the repo is
already in the state the tool wants.
This repo had no CI, so pull requests merged unverified while the iOS and
Android SDKs both gate on tests and lint.

Four jobs, mirroring the other SDK repos: unit tests with coverage, analyze
plus a format check, a guard that the committed *.g.dart sources match what
build_runner produces, and a `pub publish --dry-run` package validation
gated behind the other three.
@onamfc
onamfc force-pushed the ci/flutter-workflow branch from a6cb8c4 to 3dd3fe0 Compare August 15, 2026 21:49
dart format --set-exit-if-changed is one of the gates this workflow adds, and
it fails on main as it stands: a line wrap in deep_link_data_test.dart and two
trailing blank lines in url_parser_test.dart, both from the passthrough fix in
5f68a33, which shipped with no CI to catch them.

A PR that introduces a gate should leave the tree passing it, so the fix rides
along here rather than landing the workflow red.
@onamfc
onamfc merged commit 5e9197d into main Sep 10, 2026
4 checks passed
@onamfc
onamfc deleted the ci/flutter-workflow branch September 10, 2026 07:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant