How to diagnose, fix, and extend the CI workflows that validate the
create-python-appecosystem.Read after the top-level MAINTENANCE_RUNBOOK.md.
| Workflow | Purpose |
|---|---|
test.yml |
Unit and integration tests |
type-check.yml |
Static type checking |
lint.yml |
Ruff and formatting checks |
mega-linter.yml |
MegaLinter across the repo |
osv-scanner.yml |
Security scanning |
publish.yml |
Tag-triggered PyPI release |
smoke-distribution.yml |
End-to-end install smoke (uvx, Docker, brew, AUR) |
pr-review.yml |
PR automation |
| Workflow | Purpose |
|---|---|
ci-integrity.yml (L0) |
Registry on-disk paths + curated profile validation |
ci-templates.yml (L1) |
Every template alone |
ci-extensions.yml (L2) |
One extension × canonical template |
ci-profiles.yml (L3) |
Curated realistic stacks (ci/profiles/*.json) |
Hard contract: scaffolding in cpa-templates CI always uses:
uvx create-awesome-python-app@latest …Never check out Create-Python-App/create-python-app. Never fall back to source. Template CI must exercise the same binary users install from PyPI.
Retired: smoke-test.yml, test-combinations.yml (random + all-extensions stacks). See #46.
gh run view <run-id> --repo Create-Python-App/cpa-templates --log-failed
gh run list --repo Create-Python-App/cpa-templates --limit 20| Red cell pattern | Meaning |
|---|---|
L1 · <template> |
Baseline template broken (or empty scaffold) |
L2 · <ext> @ <template> |
That extension alone breaks the canonical template |
L3 · <profile> |
Curated stack broken (or profile JSON invalid — usually caught in L0) |
gh workflow run "CI Integrity (L0)" --repo Create-Python-App/cpa-templates --ref main
gh workflow run "CI Templates (L1)" --repo Create-Python-App/cpa-templates --ref main
gh workflow run "CI Extensions (L2)" --repo Create-Python-App/cpa-templates --ref main
gh workflow run "CI Profiles (L3)" --repo Create-Python-App/cpa-templates --ref main
gh run watch <run-id> --repo Create-Python-App/cpa-templates --exit-statusUse --ref <branch> to test a PR branch before merging.
Runs scripts/ci/validate-registry.py and generate-matrix.py --layer validate-profiles.
Matrix from templates.json. Each cell:
- Asserts
file://…?subdir=templates/<dir>exists (empty-scaffold guard). uvx create-awesome-python-app@latest … --no-installuv sync→ruff→ optionalmypy/pyright→pytest
One extension on fastapi-starter (canonical for fastapi-backend).
PRs: --changed-only unless templates.json / scripts/ci/ / ci/profiles/ / ci-*.yml change (then full).
Weekly / manual: full.
Curated JSON under ci/profiles/. Validator enforces one extension per category and type compatibility. Split categories (ci, containers, database, editor) so realistic stacks stay attributable.
REPO="$PWD"
python scripts/ci/run-scaffold-check.py \
--template-url "file://$REPO?subdir=templates/fastapi-starter" \
--addon-url "file://$REPO?subdir=extensions/fastapi-docker" \
--workdir /tmp/cpa-checkRequires uv / uvx on PATH.
| Symptom | Likely cause |
|---|---|
| Scaffold step fails | Invalid templates.json, broken file:// path, CLI regression on PyPI |
| Empty-guard fails | Wrong subdir / silent no-op copy |
uv sync fails |
Conflicting pyproject.toml merge or bad version pin |
ruff / mypy / pytest fails |
Broken template or extension files |
uvx cannot resolve package |
PyPI outage or yanked release — do not work around with a source checkout; fix publish |
Reproduce with docs/TESTING.md.