Skip to content

Commit cc29969

Browse files
committed
adding test db to ci
1 parent c0e37f0 commit cc29969

1 file changed

Lines changed: 14 additions & 2 deletions

File tree

.github/workflows/continuous_integration.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,20 @@ jobs:
6868
uv run pre-commit run --all-files
6969
working-directory: backend
7070

71-
- name: Making env file for testing
72-
run: cp .env.test.example .env.test
71+
- name: Load environment variables for testing
72+
run: cp .env.test.example .env.test # Copy the test env file
73+
working-directory: backend
74+
75+
- name: Set environment for test DB
76+
run: |
77+
echo "SQLALCHEMY_DATABASE_URI=postgresql://postgres:postgres@localhost:5433/ai_platform_test" >> .env.test
78+
working-directory: backend
79+
80+
- name: Activate virtual environment and run Alembic migrations for test DB
81+
run: |
82+
source .venv/bin/activate
83+
alembic upgrade head
84+
working-directory: backend
7385

7486
- name: Run tests
7587
run: uv run bash scripts/tests-start.sh "Coverage for ${{ github.sha }}"

0 commit comments

Comments
 (0)