fix(ci): force official pypi in venv installs

This commit is contained in:
Xiaoxia AI
2026-06-18 16:50:33 +08:00
parent fdee6b71e1
commit 3760dcfc7e
2 changed files with 28 additions and 30 deletions
+14 -15
View File
@@ -23,19 +23,17 @@ jobs:
git clone --depth=1 --branch=${GITHUB_REF_NAME} https://api.xiaoxiajianji.com/git/${GITHUB_REPOSITORY}.git .
git checkout ${GITHUB_SHA}
- name: Install quality tools
- name: Prepare quality environment
run: |
apt-get update
DEBIAN_FRONTEND=noninteractive apt-get install -y \
python3-black \
python3-isort \
python3-flake8 \
python3-mypy \
python3-bandit
python3 --version
python3 -m venv .venv
. .venv/bin/activate
python -m pip install --index-url https://pypi.org/simple --upgrade pip
python -m pip install --index-url https://pypi.org/simple black isort flake8 mypy bandit
- name: Run checks
run: |
python3 --version
. .venv/bin/activate
black --version
isort --version-number
flake8 --version
@@ -56,16 +54,17 @@ jobs:
git clone --depth=1 --branch=${GITHUB_REF_NAME} https://api.xiaoxiajianji.com/git/${GITHUB_REPOSITORY}.git .
git checkout ${GITHUB_SHA}
- name: Install test tools
- name: Prepare test environment
run: |
apt-get update
DEBIAN_FRONTEND=noninteractive apt-get install -y \
python3-pytest \
python3-pytest-cov
python3 --version
python3 -m venv .venv
. .venv/bin/activate
python -m pip install --index-url https://pypi.org/simple --upgrade pip
python -m pip install --index-url https://pypi.org/simple pytest pytest-cov pytest-asyncio
- name: Run tests
run: |
python3 --version
. .venv/bin/activate
pytest --version
echo "✅ Test environment is ready"