- Add Architectural Invariant 8 (Platform Genericism & Domain Decoupling) to AGENTS.md - Add pydantic to flake.nix, pyproject.toml, and scripts/test - Update docs/plans/p4-readiness-plan.md for Pydantic v2 pipeline and genericism - Synchronize todo.txt with completed security gate and prioritized P4 tasks
26 lines
775 B
Bash
Executable File
26 lines
775 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# scripts/test - Automated test & invariant verification runner for Homelab Core
|
|
set -euo pipefail
|
|
|
|
cd "$(dirname "$0")/.."
|
|
|
|
echo "🔍 Running code linters (ruff)..."
|
|
if command -v ruff &>/dev/null; then
|
|
ruff check .
|
|
else
|
|
nix-shell -p ruff --run "ruff check ."
|
|
fi
|
|
|
|
echo "🧪 Running architecture & security test suite (pytest)..."
|
|
if command -v pytest &>/dev/null; then
|
|
pytest tests/
|
|
else
|
|
nix-shell -p python3Packages.pytest python3Packages.pyyaml python3Packages.pydantic --run "pytest tests/"
|
|
fi
|
|
|
|
echo "❄️ Verifying NixOS flake & sandbox checks..."
|
|
nix flake check
|
|
nix eval .#nixosConfigurations.server.config.system.build.toplevel.drvPath --json >/dev/null
|
|
|
|
echo "✨ All tests and architectural invariants passed successfully!"
|