Add CI failure diagnostics

This commit is contained in:
732642856
2026-06-24 15:22:54 +08:00
parent dec62c450a
commit 9a9f403d2b
6 changed files with 53 additions and 4 deletions
+22
View File
@@ -564,10 +564,32 @@ def test_github_release_quality_gate_runs_browser_release_profile() -> None:
"python -m pip install playwright",
"python -m playwright install --with-deps chromium",
"python scripts/run_quality_gate.py --profile release --frontend-click-timeout 240",
"actions/upload-artifact@v4",
"release-quality-gate-diagnostics",
"release-quality-gate.log",
]:
assert token in workflow
def test_github_ci_workflows_upload_failure_diagnostics() -> None:
ci = (ROOT / ".github" / "workflows" / "ci.yml").read_text(encoding="utf-8")
tests = (ROOT / ".github" / "workflows" / "test.yml").read_text(encoding="utf-8")
for token in [
"actions/upload-artifact@v4",
"quick-quality-gate-diagnostics",
"quick-quality-gate.log",
]:
assert token in ci
for token in [
"actions/upload-artifact@v4",
"pytest-diagnostics",
"--junitxml=artifacts/pytest.xml",
"artifacts/pytest.log",
"--maxfail=1",
]:
assert token in tests
def test_auth_and_subscription_failures_have_recovery_guidance() -> None:
auth = read("auth.js")
subscription = read("subscription.js")