Update CI workflow to install Python 3.11 and adjust dependency installation commands

This commit is contained in:
2025-07-18 20:20:45 +08:00
parent 69a29448a2
commit 3106693e2f

View File

@ -28,14 +28,16 @@ jobs:
run: |
npm run build -- --no-check || true
- name: 安装 Python
- name: 安装 Python 3.11
run: |
apt-get update
apt-get install -y python3 python3-pip
apt-get install -y python3.11 python3.11-venv python3.11-distutils python3-pip
update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.11 1
python3 --version
- name: 安装后端依赖
working-directory: back
run: pip3 install --break-system-packages -i https://pypi.tuna.tsinghua.edu.cn/simple -r requirements.txt
run: python3.11 -m pip install --break-system-packages -i https://pypi.tuna.tsinghua.edu.cn/simple -r requirements.txt
- name: 构建 Docker 镜像
run: docker-compose build