diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index fe6ae14..c71e69d 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -419,11 +419,13 @@ jobs: - name: Validate backend (imports and app instantiation) run: | - # Install Python and pip - apt-get update && apt-get install -y python3 python3-pip python3-venv + # Install Python 3.12 (required for modern type hints like str | None) + apt-get update && apt-get install -y software-properties-common + add-apt-repository -y ppa:deadsnakes/ppa + apt-get update && apt-get install -y python3.12 python3.12-venv python3.12-dev - # Create virtual environment - python3 -m venv /tmp/backend-venv + # Create virtual environment with Python 3.12 + python3.12 -m venv /tmp/backend-venv # Use venv's pip and python directly (avoids shell activation issues) # Install core dependencies including numpy and pillow (needed for module-level imports)