|
4 | 4 |
|
5 | 5 | REPO_ROOT = Path(__file__).resolve().parents[2] |
6 | 6 | WORKFLOW = REPO_ROOT / ".github" / "workflows" / "ou-validation.yml" |
| 7 | +POST_BUILD_WORKFLOW = ( |
| 8 | + REPO_ROOT / ".github" / "workflows" / "ou-validation-post-build.yml" |
| 9 | +) |
7 | 10 |
|
8 | 11 |
|
9 | 12 | class WorkflowContractTests(unittest.TestCase): |
@@ -48,6 +51,19 @@ def test_failure_message_cannot_run_after_a_push(self): |
48 | 51 | self.assertNotIn("The regenerated bundle is committed, but", workflow) |
49 | 52 | self.assertNotIn("Fail if the manuscript no longer matches", workflow) |
50 | 53 |
|
| 54 | + def test_completed_main_build_dispatches_smoke_for_current_tip(self): |
| 55 | + workflow = POST_BUILD_WORKFLOW.read_text(encoding="utf-8") |
| 56 | + primary = WORKFLOW.read_text(encoding="utf-8") |
| 57 | + |
| 58 | + self.assertIn("workflow_dispatch:", primary) |
| 59 | + self.assertIn("workflow_run:", workflow) |
| 60 | + self.assertIn('workflows: ["build"]', workflow) |
| 61 | + self.assertIn("head_branch == 'main'", workflow) |
| 62 | + self.assertIn("actions: write", workflow) |
| 63 | + self.assertIn("gh workflow run ou-validation.yml", workflow) |
| 64 | + self.assertIn("--ref main", workflow) |
| 65 | + self.assertIn("-f validation_mode=smoke", workflow) |
| 66 | + |
51 | 67 |
|
52 | 68 | if __name__ == "__main__": |
53 | 69 | unittest.main() |
0 commit comments