feat: harden runtime import and frontend verification workflows
Some checks failed
CI / Build & Test (push) Has been cancelled
CI / Lint (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
CI / Docker Build (push) Has been cancelled
CI / Release (push) Has been cancelled

This commit is contained in:
phamnazage-jpg
2026-06-04 20:02:36 +08:00
parent 7ce72cbc35
commit 77b7f7f660
32 changed files with 2657 additions and 109 deletions

View File

@@ -22,9 +22,31 @@ GOVET_LOG="$OUTPUT_DIR/govet.txt"
INTEGRATION_LOG="$OUTPUT_DIR/integration.txt"
COVERAGE_LOG="$OUTPUT_DIR/coverage.txt"
COVERAGE_REPORT="$OUTPUT_DIR/coverage-report.md"
PORTAL_ASSETS_LOG="$OUTPUT_DIR/portal-assets.txt"
FRONTEND_SMOKE_LOG="$OUTPUT_DIR/frontend-smoke.txt"
log "quality gate output dir: $OUTPUT_DIR"
log "running portal asset regression"
bash "$ROOT_DIR/scripts/test/test_tksea_portal_assets.sh" 2>&1 | tee "$PORTAL_ASSETS_LOG"
log "running frontend browser smoke"
set +e
bash "$ROOT_DIR/scripts/test/verify_frontend_smoke.sh" 2>&1 | tee "$FRONTEND_SMOKE_LOG"
frontend_smoke_status=${PIPESTATUS[0]}
set -e
if [[ $frontend_smoke_status -ne 0 ]]; then
if grep -Eq 'PermissionError: \[Errno 1\] Operation not permitted|frontend smoke server did not start' "$FRONTEND_SMOKE_LOG"; then
if [[ "${ALLOW_BLOCKED_FRONTEND_SMOKE:-0}" == "1" ]]; then
log "frontend smoke blocked by socket-restricted environment; continuing because ALLOW_BLOCKED_FRONTEND_SMOKE=1"
else
fail "frontend smoke blocked by current environment socket restrictions; rerun in an unrestricted environment or set ALLOW_BLOCKED_FRONTEND_SMOKE=1 for local triage"
fi
else
fail "frontend browser smoke failed"
fi
fi
log "running gofmt check"
gofmt -l . | tee "$GOFMT_LOG"
if [[ -s "$GOFMT_LOG" ]]; then