chore(ci): use prebuilt python validation image
This commit is contained in:
+13
-14
@@ -18,7 +18,7 @@ jobs:
|
||||
validate:
|
||||
name: Validate Code Quality And Tests
|
||||
runs-on: ubuntu-latest
|
||||
container: python:3.12-slim
|
||||
container: xiaoxia-ci-python:3.12
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
@@ -48,28 +48,27 @@ jobs:
|
||||
archive.extract(member, '.')
|
||||
PY
|
||||
|
||||
- name: Prepare environment
|
||||
- name: Verify CI environment
|
||||
run: |
|
||||
python --version
|
||||
python -m pip --version
|
||||
python -m black --version
|
||||
python -m isort --version-number
|
||||
python -m flake8 --version
|
||||
bandit --version
|
||||
pytest --version
|
||||
echo "✅ Prebuilt CI environment is ready"
|
||||
|
||||
- name: Run code quality checks
|
||||
run: |
|
||||
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 -r requirements-quality.txt
|
||||
python -m pip install --index-url https://pypi.org/simple -r requirements-dev.txt
|
||||
|
||||
- name: Run code quality checks
|
||||
run: |
|
||||
. .venv/bin/activate
|
||||
python -m black --version
|
||||
python -m isort --version-number
|
||||
python -m flake8 --version
|
||||
python -m mypy --version
|
||||
bandit --version
|
||||
echo "✅ Code quality environment is ready"
|
||||
|
||||
- name: Run tests
|
||||
run: |
|
||||
. .venv/bin/activate
|
||||
pytest --version
|
||||
echo "✅ Test environment is ready"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user