fix(ci): run unit tests with API path

This commit is contained in:
Xiaoxia AI
2026-06-24 20:18:08 +08:00
parent 597fb7904d
commit 0ed3cb7ef5
3 changed files with 6 additions and 1 deletions
+1 -1
View File
@@ -86,7 +86,7 @@ jobs:
- name: Run tests
run: |
python -m pytest tests -q
PYTHONPATH="$PWD/apps/api:$PWD" python -m pytest tests/unit -q
- name: Build summary
if: github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/main'
+4
View File
@@ -52,6 +52,10 @@ app.mount(
)
def create_app() -> FastAPI:
return app
@app.get("/")
async def root():
return {
@@ -3,6 +3,7 @@ from pathlib import Path
ALLOWED_API_ADAPTER_IMPORTS = {
Path("apps/api/app/dependencies.py"),
Path("apps/api/app/db.py"),
Path("apps/api/app/api/routes/edit_plans.py"),
}