Files
computer-playbook/scripts/tests/code.sh
T
kevinveenbirkenbach cc9c2dceb8 fix(ci,nix): forward NIX_CONFIG into docker build and runtime to avoid GitHub rate limits
- Export NIX_CONFIG in CI jobs and Makefile
- Pass NIX_CONFIG as docker build-arg
- Use NIX_CONFIG only in relevant Dockerfile RUN steps (no secret persistence)
- Forward NIX_CONFIG to test and deploy containers

https://chatgpt.com/share/6947c681-abc8-800f-ba12-de2ff3a7abad
2025-12-21 11:05:31 +01:00

26 lines
796 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}"
'