From d0eed824c02268fc0634458a4dc30a69bbe0859a Mon Sep 17 00:00:00 2001 From: Tanya Date: Wed, 7 Jan 2026 13:38:27 -0500 Subject: [PATCH] chore: Enhance CI workflow with database schema initialization and testing dependencies This commit updates the CI workflow to include a step for initializing database schemas, ensuring that the necessary database structure is in place before running tests. Additionally, it installs `pytest` and `httpx` as testing dependencies, improving the testing environment. These changes contribute to a more robust CI process and enhance the overall development workflow. --- .gitea/workflows/ci.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 3de6ba3..66b07aa 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -184,6 +184,7 @@ jobs: run: | apt-get update && apt-get install -y postgresql-client pip install --no-cache-dir -r requirements.txt + pip install --no-cache-dir pytest httpx - name: Audit Python dependencies run: | @@ -191,6 +192,12 @@ jobs: pip-audit --desc || true continue-on-error: true + - name: Initialize database schemas + run: | + export PYTHONPATH=$(pwd) + python -c "from backend.db.models import Base; from backend.db.session import engine; Base.metadata.create_all(bind=engine)" + echo "✅ Database schema initialized" + - name: Run backend tests run: | export PYTHONPATH=$(pwd)