From 87af015ef1052615adf0ae4ca893313cba598522 Mon Sep 17 00:00:00 2001 From: "Gan, Jimmy" Date: Sat, 4 Apr 2026 15:36:09 +0800 Subject: [PATCH] fix: use virtual environment for Python dependencies in CI --- .gitea/workflows/test.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml index e2640df..9ee4b1f 100644 --- a/.gitea/workflows/test.yml +++ b/.gitea/workflows/test.yml @@ -26,19 +26,23 @@ jobs: - name: Install dependencies run: | cd dashboard/backend - pip3 install --break-system-packages -r requirements.txt - pip3 install --break-system-packages -r requirements-dev.txt - pip3 install --break-system-packages pytest-timeout + python3 -m venv venv + . venv/bin/activate + pip install -r requirements.txt + pip install -r requirements-dev.txt + pip install pytest-timeout - name: Run unit tests run: | cd dashboard/backend + . venv/bin/activate pytest tests/unit/ -v --timeout=30 -x echo "✅ Unit tests passed" - name: Run integration tests run: | cd dashboard/backend + . venv/bin/activate pytest tests/integration/ -v --timeout=30 -x echo "✅ Integration tests passed"