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 check or mypy)
- Tests (
pytest)
- Format check (
ruff format --check)
Considerations
- Use
uv for dependency installation (match the project's toolchain)
- Matrix strategy for Python versions if applicable (at minimum the project's target version)
- Cache
uv and 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_database is true, only set up Redis if include_redis is true)
- Docker service containers for PostgreSQL and Redis when those components are enabled
- Environment variables from
.env.example should be templated in
- Consider a separate
deploy.yml later (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 pytest
Acceptance criteria
Summary
Every project generated by
aegis initshould include GitHub Actions workflow files out of the box so that CI runs automatically on push/PR.What to include
Workflow:
.github/workflows/ci.ymlA single CI workflow triggered on push to
mainand all PRs that runs:ruff check)ty checkormypy)pytest)ruff format --check)Considerations
uvfor dependency installation (match the project's toolchain)uvand pip dependencies for faster runsinclude_databaseis true, only set up Redis ifinclude_redisis true).env.exampleshould be templated indeploy.ymllater (out of scope for this issue)Template structure
Example steps
Acceptance criteria
aegis initgenerates.github/workflows/ci.ymlpost_gen_tasks.pyupdated to register/remove the workflow files based on componentsmake test-templateandmake test-template-full