From 3ba93598811624c404c6e7edb487a0f4471ea9c1 Mon Sep 17 00:00:00 2001 From: AlexeerCT Date: Tue, 24 Mar 2026 15:20:08 -0500 Subject: [PATCH] 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. --- .gitea/workflows/build.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 7edc0850..34b00be4 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -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: