-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
Summary
Every project generated by aegis init should include GitHub Actions workflow files out of the box so that CI runs automatically on push/PR.
What to include
Workflow: .github/workflows/ci.yml
A single CI workflow triggered on push to main and all PRs that runs:
- Lint (
ruff check) - Type check (
ty checkormypy) - Tests (
pytest) - Format check (
ruff format --check)
Considerations
- Use
uvfor dependency installation (match the project's toolchain) - Matrix strategy for Python versions if applicable (at minimum the project's target version)
- Cache
uvand pip dependencies for faster runs - The workflow should be a Jinja template so it respects component flags (e.g., only set up PostgreSQL service if
include_databaseis true, only set up Redis ifinclude_redisis true) - Docker service containers for PostgreSQL and Redis when those components are enabled
- Environment variables from
.env.exampleshould be templated in - Consider a separate
deploy.ymllater (out of scope for this issue)
Template structure
{{ project_slug }}/.github/workflows/ci.yml.jinja
Example steps
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v4
- run: uv sync --all-extras
- run: uv run ruff check .
- run: uv run ruff format --check .
- run: uv run ty check
- run: uv run pytestAcceptance criteria
-
aegis initgenerates.github/workflows/ci.yml - Workflow passes on a fresh generated project
- PostgreSQL/Redis service containers are conditionally included based on component flags
-
post_gen_tasks.pyupdated to register/remove the workflow files based on components - Template tested with
make test-templateandmake test-template-full
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels