Install cloned WebUI dependencies in release integration
All checks were successful
Dependency Audit / dependency-audit (push) Successful in 1m38s

This commit is contained in:
2026-07-11 01:00:09 +02:00
parent 715bdcbebe
commit fcfe0b69a3

View File

@@ -42,6 +42,20 @@ run_step() {
echo "==> $*" echo "==> $*"
} }
retry() {
local attempt status
for attempt in 1 2 3; do
if "$@"; then
return 0
fi
status=$?
if [[ "$attempt" == 3 ]]; then
return "$status"
fi
sleep $((attempt * 10))
done
}
run_discovered_tests() { run_discovered_tests() {
local suite_dir="$1" local suite_dir="$1"
local status local status
@@ -60,6 +74,18 @@ run_discovered_tests() {
return "$status" return "$status"
} }
install_cloned_webui_dependencies() {
local webui_dir="$1"
if [[ ! -f "$webui_dir/package.json" ]]; then
echo "No package.json found under $webui_dir; skipping WebUI dependency install."
return 0
fi
(
cd "$webui_dir"
retry "$NPM" install --prefer-online --include=dev --no-save
)
}
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
@@ -238,9 +264,11 @@ cd "$ROOT/webui"
"$NPM" run build "$NPM" run build
run_step "Run cloned module WebUI tests" run_step "Run cloned module WebUI tests"
install_cloned_webui_dependencies "$WORK_ROOT/govoplan-mail/webui"
cd "$WORK_ROOT/govoplan-mail/webui" cd "$WORK_ROOT/govoplan-mail/webui"
"$NPM" run test:mail-ui "$NPM" run test:mail-ui
install_cloned_webui_dependencies "$WORK_ROOT/govoplan-campaign/webui"
cd "$WORK_ROOT/govoplan-campaign/webui" cd "$WORK_ROOT/govoplan-campaign/webui"
"$NPM" run test:policy-ui "$NPM" run test:policy-ui
"$NPM" run test:template-preview "$NPM" run test:template-preview