Skip to content

Commit af0119d

Browse files
tmgbeduclaude
andcommitted
fix: copy .env.example to .env in CI for config-app tests
Instead of tracking .env directly, add .env.example with safe defaults and copy it in the CI workflow before running tests. This follows the standard convention — .env stays gitignored, .env.example is the committed template. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 3c3af29 commit af0119d

3 files changed

Lines changed: 4 additions & 1 deletion

File tree

.github/workflows/test.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ jobs:
4444
working-directory: example/config-app
4545
run: uv sync
4646

47+
- name: Copy .env.example to .env (config-app)
48+
working-directory: example/config-app
49+
run: cp .env.example .env
50+
4751
- name: Run tests (config-app)
4852
working-directory: example/config-app
4953
run: uv run pytest tests/ -v

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
**/*.sqlite3
77
**/*.log
88
**/.env
9-
!example/**/.env
109
**/*.sqlite
1110
**/*.vite
1211
fastapi_startkit/dist

0 commit comments

Comments
 (0)