Skip to content

[CI] Set up GitHub Actions, run dart analyze on generated output for every PR #7

@Arjun544

Description

@Arjun544

Overview

Currently, there is no CI pipeline. Any PR that breaks the generated Dart
output, bad imports, deprecated APIs, or broken templates can land in main
undetected.

This issue sets up a GitHub Actions workflow that automatically runs
dart analyze on the generated output for every PR, blocking merges if
the generated code has errors or warnings.


What the Workflow Should Do

  1. Trigger on every PR targeting main
  2. Install dependencies with bun install
  3. Run the generator via scripts/template-dev.ts for each architecture
    and app type combination
  4. Run dart analyze on the generated dev_out/ folder
  5. Fail the workflow if any errors or warnings are found
  6. Post a summary of results as a PR comment

Matrix Strategy

The workflow should test the full combination surface:

Architectures:

  • Clean Architecture
  • MVVM
  • Feature-First

App Types (once # lands):

  • todo
  • ecommerce
  • chat
  • fintech

Run all architectures on every PR. App types can be added to the matrix
once the App Type feature is merged.


Workflow File

Create .github/workflows/ci.yml

Suggested steps:

  • Set up Bun
  • Set up Flutter SDK (use subosito/flutter-action)
  • Run bun install
  • For each architecture, run the generator and capture output
  • Run flutter analyze dev_out/ and fail on any issues
  • Upload dev_out/ as a workflow artifact for debugging

Acceptance Criteria

  • Workflow triggers automatically on every PR to main
  • Fails visibly if generated Dart has errors or warnings
  • Passes cleanly on a green template
  • Workflow completes in under 5 minutes
  • Status check is enforced in branch protection rules for main

References

  • scripts/template-dev.ts
  • docs/template-development.md
  • .github/workflows/ (create this directory)

Metadata

Metadata

Assignees

No one assigned

    Labels

    ciRelated to GitHub Actions and CI/CD pipelineenhancementNew feature or requestgood first issueGood for newcomers

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions