ci(gitea): install uv via venv to avoid PEP 668 on runners
Some checks failed
Deploy to Production / deploy (push) Successful in 34s
Test Backend / test-backend (push) Failing after 3m16s
Test Docker Compose / test-docker-compose (push) Failing after 1h4m50s
Playwright Tests / test-playwright (push) Failing after 36m21s

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
魏风
2026-05-11 10:59:34 +08:00
parent 0879346d40
commit 30fd56f86e
2 changed files with 13 additions and 9 deletions

View File

@@ -67,14 +67,16 @@ jobs:
if: steps.changes.outputs.changed == 'true'
run: |
set -euo pipefail
export PATH="${HOME}/.local/bin:${HOME}/.bun/bin:${PATH}"
export PATH="${HOME}/.bun/bin:${PATH}"
export UV_PYTHON_DOWNLOADS=automatic
sudo apt-get update -qq
sudo apt-get install -y python3 python3-pip python3-venv curl unzip ca-certificates
sudo apt-get install -y python3 python3-venv curl unzip ca-certificates
python3 -m pip install --user --upgrade pip
python3 -m pip install --user "uv>=0.4"
python3 -m venv /tmp/gitea-ci-venv
/tmp/gitea-ci-venv/bin/pip install --upgrade pip
/tmp/gitea-ci-venv/bin/pip install "uv>=0.4"
export PATH="/tmp/gitea-ci-venv/bin:${PATH}"
# Official Bun installer (not GitHub Actions)
curl -fsSL https://bun.sh/install | bash
@@ -83,7 +85,7 @@ jobs:
if: steps.changes.outputs.changed == 'true'
run: |
set -euo pipefail
export PATH="${HOME}/.local/bin:${HOME}/.bun/bin:${PATH}"
export PATH="/tmp/gitea-ci-venv/bin:${HOME}/.bun/bin:${PATH}"
export BUN_INSTALL="${HOME}/.bun"
(cd backend && uv sync)