Skip empty cloned backend test suites
All checks were successful
Dependency Audit / dependency-audit (push) Successful in 1m31s

This commit is contained in:
2026-07-11 00:38:07 +02:00
parent 7b85d6deae
commit c32951393a

View File

@@ -42,6 +42,15 @@ run_step() {
echo "==> $*" echo "==> $*"
} }
run_discovered_tests() {
local suite_dir="$1"
if ! find "$suite_dir" -type f -name 'test*.py' -print -quit | grep -q .; then
echo "No unittest test files found under $suite_dir; skipping."
return 0
fi
"$PYTHON" -m unittest discover -s "$suite_dir"
}
run_step "Validate release refs and installed package metadata" run_step "Validate release refs and installed package metadata"
"$PYTHON" - <<'PY' "$PYTHON" - <<'PY'
from __future__ import annotations from __future__ import annotations
@@ -208,9 +217,9 @@ run_step "Run core backend release tests"
"$PYTHON" scripts/check_dependency_boundaries.py "$PYTHON" scripts/check_dependency_boundaries.py
run_step "Run cloned module backend tests" run_step "Run cloned module backend tests"
"$PYTHON" -m unittest discover -s "$WORK_ROOT/govoplan-mail/tests" run_discovered_tests "$WORK_ROOT/govoplan-mail/tests"
"$PYTHON" -m unittest discover -s "$WORK_ROOT/govoplan-calendar/tests" run_discovered_tests "$WORK_ROOT/govoplan-calendar/tests"
"$PYTHON" -m unittest discover -s "$WORK_ROOT/govoplan-campaign/tests" run_discovered_tests "$WORK_ROOT/govoplan-campaign/tests"
run_step "Run core WebUI release tests and build" run_step "Run core WebUI release tests and build"
cd "$ROOT/webui" cd "$ROOT/webui"