mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-06 19:17:28 +01:00
ci: check block documentation relative links
This commit is contained in:
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()
|
||||
|
||||
@@ -69,6 +69,12 @@ jobs:
|
||||
- name: Nested module CI contracts
|
||||
run: python3 -I ../.github/block/scripts/block-ci-port-test.py
|
||||
|
||||
- name: Relative documentation links
|
||||
if: matrix.suite == 'unit'
|
||||
run: |
|
||||
python3 -B .github/scripts/doc-links-check-test.py
|
||||
python3 -I .github/scripts/doc-links-check.py .
|
||||
|
||||
- name: Runner disk is NVMe
|
||||
# A self-hosted runner whose work, temp or Go cache directory sits on a
|
||||
# SATA system disk times the process-level tests out under disk load;
|
||||
|
||||
Reference in new issue
Block a user