ci: use venv tools in quality image
Some checks failed
CI/CD Pipeline / Quality Gate (push) Failing after 11s
CI/CD Pipeline / Build and Push Images (push) Has been skipped
CI/CD Pipeline / Deploy Dev in Dokploy (push) Has been skipped
CI/CD Pipeline / Internal Notify (push) Successful in 1s

This commit is contained in:
2026-04-28 21:42:44 +02:00
parent d96b76d32f
commit c3251fa56b

View File

@@ -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
'