fix(ci): use apt packages for python tooling
This commit is contained in:
+17
-16
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user