ci: speed up CI by gating PRs on analyze/test only#116
Conversation
PR/push CI previously compiled release builds for all four platforms on every run, each repeating the checkout/pub-get/codegen the analyze job already did. The build artifacts are smoke tests, not the merge gate, so this dwarfed CI time for no merge-blocking value. Restrict ci.yml's build job to manual workflow_dispatch only; PRs now run just the analyze/test gate. Tagged releases already build every platform in release.yml, so its skip_build plumbing is removed as redundant. Also drop unused -v verbose flags from the smoke builds. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
krazyjakee
left a comment
There was a problem hiding this comment.
Review findings — ranked by severity
No bugs found. All findings are informational.
✅ [Critical] workflow_call path is correct
When release.yml calls ci.yml via workflow_call, GitHub Actions sets github.event_name to 'workflow_call' inside the called workflow — not the outer event name. So if: ${{ github.event_name == 'workflow_dispatch' }} correctly evaluates to false and skips the build job. The release.yml call path therefore gates only on analyze, as intended.
✅ [High] No remaining skip_build / inputs. references
grep confirms both workflow files are clean. The removal is complete.
✅ [Medium] workflow_call: with no sub-keys is valid
After the inputs: block is removed, workflow_call: in on: has no sub-properties. Valid YAML and valid GitHub Actions syntax — same pattern used by pull_request: and workflow_dispatch: in this file.
✅ [Low] -v removal is intentional
Verbose flags removed from ci.yml smoke-test builds (Android/Linux/Windows). release.yml keeps -v for tagged-release builds where verbose logs matter for diagnosing native-archive fetch failures.
ℹ️ [Info] release.yml's ci job has no needs: [verify] (pre-existing)
verify (version-string check) and ci (Flutter analyze/test) run in parallel on every tag push. In the failure case (wrong tag version) CI wastes a few runner minutes. Not a regression from this PR — the trade-off is faster happy-path releases, and build already gates on both.
No code changes needed. The PR is logically correct, comments are accurate, and the removal of skip_build cleanly transfers responsibility for the guard from callers to the workflow itself.
Generated by Claude Code
Summary
CI was slow because the
buildjob compiled release binaries for all four platforms (Web, Android, Linux, Windows) on every push and PR. Each of those runners independently repeated the checkout →pub get→build_runnercodegen that theanalyzejob already did, so a single CI run did ~5 Flutter setups + 4 release builds.The release builds are smoke-test artifacts, not the merge gate (
analyzeis). This change restricts them to run only on demand.What changed
ci.yml— thebuildjob now runs only on manualworkflow_dispatch(if: github.event_name == 'workflow_dispatch'). PRs and pushes now run just theanalyze(codegen + analyze + test) gate.ci.yml— removed the now-unusedskip_buildworkflow_callinput.ci.yml— dropped-vverbose flags from the Android/Linux/Windows smoke builds (faster log streaming, no functional change).release.yml— dropped the defunctwith: skip_build: truefrom itsci.ymlcall. Tagged releases still gate on analyze/test and build every platform via their own matrix (unchanged).Net effect
Reviewer notes
grepconfirms no remaining references toskip_buildorinputs.in.github/workflows/.🤖 Generated with Claude Code