mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-06 19:01:54 +00:00
- Replace static argparse-based CLI in cli.deploy.development with dynamic module dispatcher compatible with nested command discovery. - Ensure cli.deploy.development is executable via python -m and root dispatcher. - Fix unit test path resolution to work locally and in CI. - Make docker-* Makefile targets depend on install. - Simplify test runner script and keep Nix flake config compatibility. This aligns the CLI architecture with integration test discovery (cli/**/__main__.py) and removes the need for manual subcommand registration. https://chatgpt.com/share/696fdbbc-b6d8-800f-a8b5-067aa7e38706
29 lines
752 B
Bash
Executable File
29 lines
752 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
echo "============================================================"
|
|
echo ">>> Running UNIT tests "
|
|
echo "============================================================"
|
|
|
|
: "${TEST_PATTERN:?TEST_PATTERN must be set}"
|
|
: "${TEST_TYPE:?TEST_TYPE must be set}"
|
|
|
|
set -euo pipefail
|
|
|
|
# Keep old NIX flake behavior
|
|
NIX_CONFIG_EFFECTIVE="$(
|
|
printf '%s\n%s\n' \
|
|
"${NIX_CONFIG:-}" \
|
|
'accept-flake-config = true' \
|
|
| sed -e 's/[[:space:]]\+$//' -e '/^$/d'
|
|
)"
|
|
export NIX_CONFIG="${NIX_CONFIG_EFFECTIVE}"
|
|
|
|
echo "PWD=$(pwd)"
|
|
echo "PYTHON=${PYTHON}"
|
|
|
|
export PATH="$(dirname "$PYTHON"):$PATH"
|
|
|
|
make setup
|
|
"$PYTHON" -m unittest discover -s tests/${TEST_TYPE} -t . -p "${TEST_PATTERN}"
|