ci/docs: wire docs sync validator into workflows and tighten tests
All checks were successful
Gitea CI / test (push) Successful in 33s
Gitea CI / test (pull_request) Successful in 35s

This commit is contained in:
agentson
2026-03-01 23:09:20 +09:00
parent 51fd6b7a72
commit 6656adc2b7
4 changed files with 34 additions and 6 deletions

View File

@@ -69,6 +69,27 @@ def test_validate_summary_docs_reference_core_docs(monkeypatch) -> None:
assert errors == []
def test_validate_summary_docs_reference_core_docs_reports_missing_links(
monkeypatch,
) -> None:
module = _load_module()
errors: list[str] = []
fake_docs = {
str(module.REQUIRED_FILES["README.md"]): "docs/workflow.md",
str(module.REQUIRED_FILES["CLAUDE.md"]): "docs/workflow.md",
}
def fake_read(path: Path) -> str:
return fake_docs[str(path)]
monkeypatch.setattr(module, "_read", fake_read)
module.validate_summary_docs_reference_core_docs(errors)
assert any("README.md" in err and "docs/commands.md" in err for err in errors)
assert any("README.md" in err and "docs/testing.md" in err for err in errors)
assert any("CLAUDE.md" in err and "docs/commands.md" in err for err in errors)
def test_validate_commands_endpoint_duplicates_reports_duplicates(monkeypatch) -> None:
module = _load_module()
errors: list[str] = []