#!/bin/bash set -euo pipefail export DEBIAN_FRONTEND=noninteractive SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)" cd "${SCRIPT_DIR}" if [ -w /usr/local/bin ] && [ ! -e /usr/local/bin/build.sh ]; then ln -s "${SCRIPT_DIR}/build.sh" /usr/local/bin/build.sh || true fi if [ -w /usr/local/bin ] && [ ! -e /usr/local/bin/setup.sh ]; then ln -s "${SCRIPT_DIR}/setup.sh" /usr/local/bin/setup.sh || true fi apt-get update apt-get install -y --no-install-recommends \ bash \ git \ ca-certificates \ python3 \ python3-pip \ python3-venv \ tzdata rm -rf /var/lib/apt/lists/* PYTHON_BIN="$(command -v python3)" PIP_BIN="$(command -v pip3 || true)" if [ -z "${PIP_BIN}" ] && [ -n "${PYTHON_BIN}" ]; then PIP_BIN="${PYTHON_BIN} -m pip" fi if [ -n "${PIP_BIN}" ]; then ${PIP_BIN} install --no-cache-dir --upgrade pip >/dev/null 2>&1 || true ${PIP_BIN} install --no-cache-dir --break-system-packages -r /repo/requirements-dev.txt || \ ${PIP_BIN} install --no-cache-dir -r /repo/requirements-dev.txt fi cd /repo PYTHONPATH=/repo/src pytest -q