Skip to content

Commit d77f89e

Browse files
committed
test(ci): enforce Windows speech export in required-job contract
1 parent 14a27b4 commit d77f89e

2 files changed

Lines changed: 19 additions & 4 deletions

File tree

tests/test_ci_required.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
"Clean-repo guard + Python checks=success",
1717
"UI tests + lint + type-check + build=success",
1818
"UI E2E boot (Chromium + simulated API)=success",
19+
"Speech E2E Windows (real H.264 + AAC)=success",
1920
]
2021

2122

@@ -24,6 +25,7 @@ def test_all_success_is_ok():
2425
"guard": "success",
2526
"ui": "success",
2627
"e2e": "success",
28+
"speech_windows": "success",
2729
})
2830
assert ok is True
2931
assert failed == []
@@ -52,6 +54,13 @@ def test_cli_failed_dependency_exit():
5254
assert main(pairs) == 1
5355

5456

57+
@pytest.mark.parametrize("result", ["failure", "cancelled", "skipped", ""])
58+
def test_windows_speech_export_is_a_required_dependency(result):
59+
pairs = list(REQUIRED)
60+
pairs[3] = f"Speech E2E Windows (real H.264 + AAC)={result}"
61+
assert main(pairs) == 1
62+
63+
5564
def test_cli_cancelled_dependency_exit():
5665
pairs = list(REQUIRED)
5766
pairs[2] = "UI E2E boot (Chromium + simulated API)=cancelled"

tests/test_development_branch_policy.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,16 @@ def test_ci_required_aggregates_existing_job_names(self):
8080
self.assertIn('name: UI E2E boot (Chromium + simulated API)', text)
8181
self.assertIn('name: CI required', text)
8282
self.assertIn('if: always()', text)
83-
self.assertIn('needs: [guard, ui-check, ui-e2e]', text)
84-
self.assertNotIn('code-health-comment', text.split('needs: [guard, ui-check, ui-e2e]', 1)[1][:200])
85-
self.assertNotIn('independent-qa', text.split('needs: [guard, ui-check, ui-e2e]', 1)[1][:200])
86-
self.assertNotIn('Independent QA', text.split('needs: [guard, ui-check, ui-e2e]', 1)[1][:400])
83+
dependencies = 'needs: [guard, ui-check, ui-e2e, ui-speech-windows]'
84+
self.assertIn(dependencies, text)
85+
self.assertNotIn('code-health-comment', text.split(dependencies, 1)[1][:200])
86+
self.assertNotIn('independent-qa', text.split(dependencies, 1)[1][:200])
87+
self.assertNotIn('Independent QA', text.split(dependencies, 1)[1][:400])
88+
self.assertIn('Speech E2E Windows (real H.264 + AAC)=${{ needs.ui-speech-windows.result }}', text)
89+
windows = text.split(' ui-speech-windows:', 1)[1].split(' code-health-comment:', 1)[0]
90+
self.assertIn('HOCUSPOCUS_REQUIRE_SPEECH_AAC: "1"', windows)
91+
self.assertIn('playwright install chromium msedge', windows)
92+
self.assertIn('scene3d-speech.spec.ts scene3d-media-screen.spec.ts', windows)
8793

8894
def test_agent_qa_policy_still_lists_ci_required(self):
8995
text = (ROOT / 'docs/development/AGENT_QA_POLICY.md').read_text(encoding='utf-8')

0 commit comments

Comments
 (0)