ci: check block documentation relative links

This commit is contained in:
pingqiu committed 2026-12-04 19:12:07 -08:00
1 parent b699a0dd01
commit 1776005e5b
2 files changed
+17

No files matched your search

@@ -12,6 +12,17 @@ ROOT = HERE.parents[2]
class PortTests(unittest.TestCase):
def test_relative_documentation_links_are_checked(self):
text = (ROOT / ".github/workflows/block-test.yml").read_text()
marker = " - name: Relative documentation links\n"
self.assertEqual(text.count(marker), 1)
step = text.split(marker, 1)[1].split("\n - name:", 1)[0]
self.assertIn("if: matrix.suite == 'unit'", step)
self.assertIn("python3 -B .github/scripts/doc-links-check-test.py", step)
self.assertIn("python3 -I .github/scripts/doc-links-check.py .", step)
self.assertNotIn("continue-on-error", step)
self.assertNotIn("|| true", step)
def test_root_workflows_use_module_run_and_action_paths(self):
for name in ("test", "spec-trace", "post-merge-review", "known-bugs"):
text = (ROOT / (".github/workflows/block-" + name + ".yml")).read_text()