Skip to content

Commit f44e400

Browse files
ci: add cross-platform scaffold smoke
Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 1cfbd23 commit f44e400

2 files changed

Lines changed: 94 additions & 1 deletion

File tree

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
name: Cross-platform scaffold smoke
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
workflow_dispatch:
9+
10+
permissions:
11+
contents: read
12+
13+
concurrency:
14+
group: scaffold-cross-platform-${{ github.ref }}
15+
cancel-in-progress: true
16+
17+
jobs:
18+
scaffold:
19+
name: ${{ matrix.os }} / fastapi-starter
20+
runs-on: ${{ matrix.os }}
21+
strategy:
22+
fail-fast: false
23+
matrix:
24+
os: [ubuntu-latest, macos-latest, windows-latest]
25+
steps:
26+
- uses: astral-sh/setup-uv@v7
27+
- uses: actions/setup-python@v6
28+
with:
29+
python-version: "3.12"
30+
31+
- name: Scaffold FastAPI starter from PyPI CLI
32+
env:
33+
TARGET: ${{ runner.temp }}/cpa-fastapi-starter
34+
shell: bash
35+
run: |
36+
set -euo pipefail
37+
uvx create-awesome-python-app@latest "$TARGET" \
38+
--template fastapi-starter \
39+
--no-interactive \
40+
--no-install \
41+
--force
42+
43+
- name: Verify scaffolded project
44+
env:
45+
TARGET: ${{ runner.temp }}/cpa-fastapi-starter
46+
shell: bash
47+
run: |
48+
set -euo pipefail
49+
python - <<'PY'
50+
import os
51+
from pathlib import Path
52+
53+
target = Path(os.environ["TARGET"])
54+
required = [
55+
target / "pyproject.toml",
56+
target / "app" / "main.py",
57+
target / "README.md",
58+
]
59+
missing = [str(path) for path in required if not path.exists()]
60+
if missing:
61+
raise SystemExit(f"Missing scaffolded files: {missing}")
62+
print(f"Verified scaffold at {target}")
63+
PY
64+
65+
addon-smoke:
66+
name: ubuntu-latest / fastapi-starter + python-docker
67+
runs-on: ubuntu-latest
68+
steps:
69+
- uses: astral-sh/setup-uv@v7
70+
- uses: actions/setup-python@v6
71+
with:
72+
python-version: "3.12"
73+
74+
- name: Scaffold with one extension from PyPI CLI
75+
env:
76+
TARGET: ${{ runner.temp }}/cpa-fastapi-docker
77+
run: |
78+
set -euo pipefail
79+
uvx create-awesome-python-app@latest "$TARGET" \
80+
--template fastapi-starter \
81+
--addons python-docker \
82+
--no-interactive \
83+
--no-install \
84+
--force
85+
86+
- name: Verify extension files
87+
env:
88+
TARGET: ${{ runner.temp }}/cpa-fastapi-docker
89+
run: |
90+
set -euo pipefail
91+
test -f "$TARGET/Dockerfile"
92+
test -f "$TARGET/.dockerignore"

docs/CPA_TEMPLATES_TRACKING.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ uvx create-awesome-python-app@latest …
3131

3232
It must **not** check out this monorepo or fall back to `uv run` against a local source tree. That way green Actions means the same binary users install works with the templates under test.
3333

34-
CLI CI in this repo stays focused on unit/lint/type/smoke-distribution (`uvx` / Docker / brew / AUR).
34+
CLI CI in this repo stays focused on unit/lint/type, cross-platform scaffold
35+
smoke via published `uvx`, and smoke-distribution (`uvx` / Docker / brew / AUR).
3536

3637
## CNA parity reference
3738

0 commit comments

Comments
 (0)