diff --git a/tests/test_doc_pages.py b/tests/test_doc_pages.py index 27487bbf..86e44d4d 100644 --- a/tests/test_doc_pages.py +++ b/tests/test_doc_pages.py @@ -581,5 +581,24 @@ class ResolutionSkipsNamesForUnheldFiles(unittest.TestCase): self.assertIn("restore_large_files.py", section) +class CiTriggersPointToTheirLists(unittest.TestCase): + """The CI table listed six directories for validate.yml, which also runs + on the installer, wiki/ and every other site input: a contributor + touching only wiki/ read that no check would run.""" + + def test_the_table_does_not_copy_a_path_list(self): + import yaml + + section = _section(_page("architecture.md"), "CI workflows") + self.assertNotRegex(section, r"on bios/, platforms/|\(platforms, emulators, wiki, scripts\)") + self.assertIn("`paths:`", section) + self.assertIn("test_workflow_paths.py", section) + workflow = yaml.safe_load((ROOT / ".github/workflows/validate.yml").read_text(encoding="utf-8")) + paths = workflow.get("on", workflow.get(True))["pull_request"]["paths"] + for named in ("wiki/**", "install.sh"): + self.assertIn(named, paths) + self.assertIn(f"`{named.rstrip('*')}`", section) + + if __name__ == "__main__": unittest.main() diff --git a/wiki/architecture.md b/wiki/architecture.md index ffc09f34..dc301edf 100644 --- a/wiki/architecture.md +++ b/wiki/architecture.md @@ -450,8 +450,14 @@ pattern and how to add a test. | Workflow | File | Trigger | Role | |----------|------|---------|------| -| Deploy Site | `deploy-site.yml` | push to main (platforms, emulators, wiki, scripts) + manual | validate contracts, generate site, build with MkDocs, validate rendered HTML, deploy to Pages | -| Validation | `validate.yml` | pull request and push to main on bios/, platforms/, emulators/, schemas/, scripts/, tests/ | schema check and full test suite on both, BIOS hash validation and auto-label on pull requests | +| Deploy Site | `deploy-site.yml` | push to main on any input of the site build, and manual | validate contracts, generate site, build with MkDocs, validate rendered HTML, deploy to Pages | +| Validation | `validate.yml` | pull request and push to main on the collection, profiles, schemas, scripts, tests, the installer and every input of the site build | schema check and full test suite on both, BIOS hash validation and auto-label on pull requests | + +Each workflow's `paths:` list is the exact set of files that starts it. +`tests/test_workflow_paths.py` holds the Deploy Site list to the scripts the build +imports, and the Validation list to every input of the site build, so a change that +would fail the deploy fails the pull request first. A change to `wiki/`, to +`install.sh` or to any other path in that list runs the full suite. Releases are not built in CI: the packs are generated and checked on the maintainer's machine and uploaded with `gh`, see the