ci: use venv tools in quality image
This commit is contained in:
@@ -95,7 +95,7 @@ jobs:
|
||||
|
||||
image_usable() {
|
||||
docker run --rm "${CI_GOLDEN_REF}:${GOLDEN_TAG}" \
|
||||
bash -lc 'command -v ruff >/dev/null && python -m pytest --version >/dev/null'
|
||||
bash -c '/app/.venv/bin/ruff --version >/dev/null && /app/.venv/bin/python -m pytest --version >/dev/null'
|
||||
}
|
||||
|
||||
if ! docker buildx imagetools inspect "${CI_GOLDEN_REF}:${GOLDEN_TAG}" >/dev/null 2>&1 || ! image_usable; then
|
||||
@@ -119,16 +119,17 @@ jobs:
|
||||
-e SKIP_LINT="${SKIP_LINT}" \
|
||||
-e SKIP_TEST="${SKIP_TEST}" \
|
||||
"${CI_GOLDEN_REF}:${GOLDEN_TAG}" \
|
||||
bash -lc '
|
||||
bash -c '
|
||||
set -euo pipefail
|
||||
export PATH="/app/.venv/bin:${PATH}"
|
||||
export PYTHONPATH="/workspace/src:${PYTHONPATH:-}"
|
||||
if [ "${SKIP_LINT}" != "true" ]; then
|
||||
ruff check src
|
||||
ruff format src --check
|
||||
/app/.venv/bin/ruff check src
|
||||
/app/.venv/bin/ruff format src --check
|
||||
fi
|
||||
if [ "${SKIP_TEST}" != "true" ]; then
|
||||
python -m pytest tests --ignore=tests/test_api_inventory_e2e.py -q
|
||||
python -m pytest tests/test_api_inventory_e2e.py -q
|
||||
/app/.venv/bin/python -m pytest tests --ignore=tests/test_api_inventory_e2e.py -q
|
||||
/app/.venv/bin/python -m pytest tests/test_api_inventory_e2e.py -q
|
||||
fi
|
||||
'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user