@@ -93,3 +93,120 @@ jobs:
9393 - name : Test
9494 working-directory : /tmp/rendered-minimal
9595 run : uv run pytest -v
96+
97+ validate-cli :
98+ name : Validate (use_cli)
99+ runs-on : ubuntu-latest
100+ steps :
101+ - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
102+ - uses : astral-sh/setup-uv@94527f2e458b27549849d47d273a16bec83a01e9 # v7
103+ with :
104+ version : " 0.11.3"
105+ python-version : " 3.12"
106+ - name : Configure git
107+ run : |
108+ git config --global user.name "CI"
109+ git config --global user.email "ci@test.com"
110+ - name : Render template (cli)
111+ run : |
112+ TEMPLATE_DIR=$(mktemp -d)
113+ git archive HEAD | tar -C "$TEMPLATE_DIR" -xf -
114+ uvx copier copy "$TEMPLATE_DIR" /tmp/rendered-cli \
115+ --trust \
116+ --defaults \
117+ --overwrite \
118+ --data project_name=cli-project \
119+ --data description="A CLI project" \
120+ --data author_name="Test Author" \
121+ --data author_email="test@example.com" \
122+ --data github_user=test-user \
123+ --data use_cli=true
124+ - name : Lint
125+ working-directory : /tmp/rendered-cli
126+ run : |
127+ uv run ruff check src/ tests/
128+ uv run ruff format --check src/ tests/
129+ - name : Type check
130+ working-directory : /tmp/rendered-cli
131+ run : uv run mypy src/
132+ - name : Test
133+ working-directory : /tmp/rendered-cli
134+ run : uv run pytest -v
135+
136+ validate-api :
137+ name : Validate (use_api)
138+ runs-on : ubuntu-latest
139+ steps :
140+ - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
141+ - uses : astral-sh/setup-uv@94527f2e458b27549849d47d273a16bec83a01e9 # v7
142+ with :
143+ version : " 0.11.3"
144+ python-version : " 3.12"
145+ - name : Configure git
146+ run : |
147+ git config --global user.name "CI"
148+ git config --global user.email "ci@test.com"
149+ - name : Render template (api)
150+ run : |
151+ TEMPLATE_DIR=$(mktemp -d)
152+ git archive HEAD | tar -C "$TEMPLATE_DIR" -xf -
153+ uvx copier copy "$TEMPLATE_DIR" /tmp/rendered-api \
154+ --trust \
155+ --defaults \
156+ --overwrite \
157+ --data project_name=api-project \
158+ --data description="An API project" \
159+ --data author_name="Test Author" \
160+ --data author_email="test@example.com" \
161+ --data github_user=test-user \
162+ --data use_api=true
163+ - name : Lint
164+ working-directory : /tmp/rendered-api
165+ run : |
166+ uv run ruff check src/ tests/
167+ uv run ruff format --check src/ tests/
168+ - name : Type check
169+ working-directory : /tmp/rendered-api
170+ run : uv run mypy src/
171+ - name : Test
172+ working-directory : /tmp/rendered-api
173+ run : uv run pytest -v --cov=src --cov-report=xml
174+
175+ validate-db :
176+ name : Validate (use_db)
177+ runs-on : ubuntu-latest
178+ steps :
179+ - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
180+ - uses : astral-sh/setup-uv@94527f2e458b27549849d47d273a16bec83a01e9 # v7
181+ with :
182+ version : " 0.11.3"
183+ python-version : " 3.12"
184+ - name : Configure git
185+ run : |
186+ git config --global user.name "CI"
187+ git config --global user.email "ci@test.com"
188+ - name : Render template (db)
189+ run : |
190+ TEMPLATE_DIR=$(mktemp -d)
191+ git archive HEAD | tar -C "$TEMPLATE_DIR" -xf -
192+ uvx copier copy "$TEMPLATE_DIR" /tmp/rendered-db \
193+ --trust \
194+ --defaults \
195+ --overwrite \
196+ --data project_name=db-project \
197+ --data description="A DB project" \
198+ --data author_name="Test Author" \
199+ --data author_email="test@example.com" \
200+ --data github_user=test-user \
201+ --data use_db=true
202+ - name : Lint
203+ working-directory : /tmp/rendered-db
204+ run : |
205+ uv run ruff check src/ tests/
206+ uv run ruff format --check src/ tests/
207+ - name : Type check
208+ working-directory : /tmp/rendered-db
209+ run : uv run mypy src/
210+ - name : Test
211+ working-directory : /tmp/rendered-db
212+ run : uv run pytest -v --cov=src --cov-report=xml
0 commit comments