Skip to content

Add generated project validation to CI #13

@manavgup

Description

@manavgup

Context

Borrowed from IBM/mcp-context-forge which validates generated output in CI.

We validate individual templates with ast.parse in unit tests, but never scaffold a full project and validate the result as a whole (imports resolve, ruff passes, no stubs remain, etc.).

What to do

  • Add an e2e smoke test that:
    1. faststack init blog --entities fixtures/blog.yaml (create a fixture YAML with 2-3 entities)
    2. faststack add-entity Comment --fields "body:text:required"
    3. faststack generate --all
    4. faststack list
    5. Verify: all .py files pass ast.parse, ruff check, black --check
    6. Verify: dependencies.py exists with all providers, main.py has all routers
  • Add this as a pytest test (marked @pytest.mark.e2e)
  • Optionally add make smoke Makefile target

Acceptance criteria

  • E2e test scaffolds a complete project and validates all generated code
  • Test runs in CI as part of make check

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions