fix(ci): use apt packages for python tooling
CI/CD Pipeline / Code Quality Check (push) Failing after 53s
CI/CD Pipeline / Run Tests (push) Has been skipped
CI/CD Pipeline / Build Summary (push) Has been skipped

This commit is contained in:
Xiaoxia AI
2026-06-18 16:46:57 +08:00
parent 7c99f26667
commit 1fd5abc5cf
2 changed files with 34 additions and 32 deletions
+17 -16
View File
@@ -23,19 +23,21 @@ jobs:
git clone --depth=1 --branch=${GITHUB_REF_NAME} https://api.xiaoxiajianji.com/git/${GITHUB_REPOSITORY}.git .
git checkout ${GITHUB_SHA}
- name: Prepare Python environment
- name: Install quality tools
run: |
python3 --version
python3 -m venv .venv
. .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install black isort mypy flake8 bandit
apt-get update
DEBIAN_FRONTEND=noninteractive apt-get install -y \
python3-black \
python3-isort \
python3-flake8 \
python3-mypy \
python3-bandit
- name: Run checks
run: |
. .venv/bin/activate
python3 --version
black --version
isort --version
isort --version-number
flake8 --version
mypy --version
bandit --version
@@ -54,18 +56,17 @@ jobs:
git clone --depth=1 --branch=${GITHUB_REF_NAME} https://api.xiaoxiajianji.com/git/${GITHUB_REPOSITORY}.git .
git checkout ${GITHUB_SHA}
- name: Prepare test environment
- name: Install test tools
run: |
python3 --version
python3 -m venv .venv
. .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install pytest pytest-cov pytest-asyncio
apt-get update
DEBIAN_FRONTEND=noninteractive apt-get install -y \
python3-pytest \
python3-pytest-cov
- name: Run tests
run: |
. .venv/bin/activate
python --version
python3 --version
pytest --version
echo "✅ Test environment is ready"
build-summary: