mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-06 10:59:59 +00:00
- Add `make format` target running shfmt + ruff format + ruff check --fix - Reformat shell scripts with shfmt - Apply ruff formatting and autofixes across Python code https://chatgpt.com/share/69480c5a-b0bc-800f-9a2b-770d98c1b6ff
26 lines
789 B
Bash
Executable File
26 lines
789 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
echo "============================================================"
|
|
echo ">>> Running UNIT tests in ${INFINITO_DISTRO} container"
|
|
echo "============================================================"
|
|
|
|
docker run --rm \
|
|
-e INSTALL_LOCAL_BUILD=1 \
|
|
-e TEST_PATTERN="${TEST_PATTERN}" \
|
|
-e TEST_TYPE="${TEST_TYPE}" \
|
|
-e NIX_CONFIG="${NIX_CONFIG}" \
|
|
-v "$(pwd):/opt/src/infinito" \
|
|
"infinito-${INFINITO_DISTRO}" \
|
|
bash -lc '
|
|
set -euo pipefail
|
|
cd /opt/src/infinito
|
|
|
|
echo "PWD=$(pwd)"
|
|
echo "PYTHON=${PYTHON}"
|
|
export PATH="$(dirname "$PYTHON"):$PATH"
|
|
# Ensure we really use the exported interpreter (and thus the global venv)
|
|
make setup
|
|
"${PYTHON}" -m unittest discover -s tests/${TEST_TYPE} -t . -p "${TEST_PATTERN}"
|
|
'
|