Add live acceptance smoke validation

This commit is contained in:
2026-06-30 13:02:13 +08:00
parent 7a43303f15
commit bf9b5c33e0
7 changed files with 299 additions and 9 deletions

View File

@@ -8,6 +8,7 @@ import urllib.error
import urllib.request
from pathlib import Path
from ..acceptance import run_live_acceptance
from ..catalog import get_catalog
from ..config import settings
from ..coverage import get_coverage_report
@@ -84,6 +85,9 @@ def validate_project(run_build: bool = False) -> dict:
checks.append({"name": "live_dataset_api", "passed": datasets["passed"] and datasets.get("body", "").lstrip().startswith("["), "detail": datasets})
checks.append({"name": "live_coverage_api", "passed": live_coverage["passed"] and '"task_build_passed":true' in live_coverage.get("body", "").replace(" ", ""), "detail": live_coverage})
checks.append({"name": "live_frontend_index", "passed": frontend["passed"] and "Seg Data Server" in frontend.get("body", ""), "detail": frontend})
if os.getenv("SEG_VALIDATE_ACCEPTANCE", "1") == "1":
acceptance = run_live_acceptance(backend_url)
checks.append({"name": "live_acceptance_smoke", "passed": acceptance["passed"], "detail": acceptance})
if run_build:
tests = _run(["conda", "run", "-n", settings.backend_conda_env, "python", "-m", "pytest", "-q"], cwd=settings.project_root, timeout=120)