From 53724c16717c1a299f4a61351446a44be434b309 Mon Sep 17 00:00:00 2001 From: Tomas Kracmar Date: Thu, 28 May 2026 15:38:55 +0200 Subject: [PATCH] Fix CI: use venv to avoid PEP 668 externally-managed-environment error --- .gitea/workflows/ci.yml | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index cafff4a..0336a3a 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -18,20 +18,28 @@ jobs: - name: Set up Python run: | - apt-get update && apt-get install -y python3 python3-pip python3-venv || true + apt-get update && apt-get install -y python3 python3-venv || true python3 --version - name: Install dependencies run: | - python3 -m pip install --upgrade pip - python3 -m pip install -r requirements.txt - python3 -m pip install -r requirements-dev.txt + python3 -m venv .venv + source .venv/bin/activate + pip install --upgrade pip + pip install -r requirements.txt + pip install -r requirements-dev.txt - name: Lint with ruff - run: python3 -m ruff check . + run: | + source .venv/bin/activate + ruff check . - name: Format check with ruff - run: python3 -m ruff format --check . + run: | + source .venv/bin/activate + ruff format --check . - name: Run tests - run: python3 -m pytest -q + run: | + source .venv/bin/activate + pytest -q