Update CI workflow to include database migration before running tests
- Added an environment variable for the test database URL and executed an Alembic migration to ensure the database schema is up-to-date prior to running tests. - This change aims to improve the reliability of test execution by ensuring the correct database state.
This commit is contained in:
@@ -64,6 +64,8 @@ jobs:
|
||||
python -m pip install --upgrade pip
|
||||
pip install -r "$GITHUB_WORKSPACE/backend/requirements.txt"
|
||||
cd "$GITHUB_WORKSPACE/backend"
|
||||
export DATABASE_URL="$TEST_DATABASE_URL"
|
||||
alembic upgrade head
|
||||
pytest -q tests -v -ra -s
|
||||
|
||||
build:
|
||||
|
||||
Reference in New Issue
Block a user