mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-06 01:53:56 -06:00
docs: list the site build among the PR checks
CONTRIBUTING named the checks CI runs on a pull request and left out the npm build, validate_site.py, vermin and the pip packages the test job installs. A wiki-only change passed every listed check and failed CI.
This commit is contained in:
1 parent
6ae9e461bd
commit
46a6ac2675
3 files changed
+27
-2
No files matched your search
+4
-1
@@ -64,13 +64,16 @@ validation above is its check. For code, profiles or platform files, these are
|
||||
the checks CI runs on a pull request (Python 3.12 or newer):
|
||||
|
||||
```bash
|
||||
pip install pyyaml "jsonschema[format-nongpl]" markdown
|
||||
pip install pyyaml "jsonschema[format-nongpl]" markdown pyte hypothesis vermin
|
||||
python scripts/validate_pr.py --changed # the BIOS files the branch adds
|
||||
python scripts/validate_schemas.py --source-only # profiles and platform files
|
||||
python scripts/profile_sync.py --added --base upstream/main --strict # each profile the branch adds
|
||||
python scripts/refresh_data_dirs.py # data directories the pack-building tests read
|
||||
python scripts/generate_site.py # the pages the site tests read
|
||||
npm ci --prefix website && npm run build --prefix website # the built site, Node 24
|
||||
python -m unittest discover -s tests -t .
|
||||
python scripts/validate_site.py --site-dir website/dist # links and page budgets
|
||||
vermin --no-tips -t=3.8- --violations install.py # install.py stays on Python 3.8
|
||||
```
|
||||
|
||||
`upstream` is this repository as a remote of your fork
|
||||
|
||||
@@ -969,13 +969,16 @@ validation above is its check. For code, profiles or platform files, these are
|
||||
the checks CI runs on a pull request (Python 3.12 or newer):
|
||||
|
||||
```bash
|
||||
pip install pyyaml "jsonschema[format-nongpl]" markdown
|
||||
pip install pyyaml "jsonschema[format-nongpl]" markdown pyte hypothesis vermin
|
||||
python scripts/validate_pr.py --changed # the BIOS files the branch adds
|
||||
python scripts/validate_schemas.py --source-only # profiles and platform files
|
||||
python scripts/profile_sync.py --added --base upstream/main --strict # each profile the branch adds
|
||||
python scripts/refresh_data_dirs.py # data directories the pack-building tests read
|
||||
python scripts/generate_site.py # the pages the site tests read
|
||||
npm ci --prefix website && npm run build --prefix website # the built site, Node 24
|
||||
python -m unittest discover -s tests -t .
|
||||
python scripts/validate_site.py --site-dir website/dist # links and page budgets
|
||||
vermin --no-tips -t=3.8- --violations install.py # install.py stays on Python 3.8
|
||||
```
|
||||
|
||||
`upstream` is this repository as a remote of your fork
|
||||
|
||||
@@ -78,6 +78,25 @@ class BeforeOpeningAPullRequest(unittest.TestCase):
|
||||
self.assertIn("profile_sync.py --added --base upstream/main --strict", block)
|
||||
self.assertNotIn("--changed --strict", block)
|
||||
|
||||
def test_it_names_the_site_build_and_the_packages_ci_runs(self):
|
||||
"""A wiki-only change passed every listed check and failed CI on
|
||||
validate_site.py, which the list did not name."""
|
||||
text = generate_readme.generate_contributing()
|
||||
section = text.split("## Before opening a PR", 1)[1].split("\n## ", 1)[0]
|
||||
workflow = (REPO_ROOT / ".github" / "workflows" / "validate.yml").read_text(encoding="utf-8")
|
||||
for command in ("npm ci --prefix website", "npm run build --prefix website",
|
||||
"validate_site.py --site-dir website/dist",
|
||||
"vermin --no-tips -t=3.8- --violations install.py"):
|
||||
with self.subTest(command=command):
|
||||
self.assertIn(command, workflow)
|
||||
self.assertIn(command, section)
|
||||
installed = re.search(r'^\s*run: pip install (pyyaml "jsonschema.*markdown.*)$',
|
||||
workflow, re.M).group(1)
|
||||
pip_line = next(line for line in section.splitlines() if line.startswith("pip install"))
|
||||
for package in (re.split(r"[\[=]", token.strip('"'))[0] for token in installed.split()):
|
||||
with self.subTest(package=package):
|
||||
self.assertRegex(pip_line, rf"\b{package}\b")
|
||||
|
||||
def test_it_installs_what_the_checks_need_and_no_site_package(self):
|
||||
"""The site is built by Node from website/package-lock.json: a pip
|
||||
line naming the old theme installed packages nothing reads."""
|
||||
|
||||
Reference in new issue
Block a user