Skip to content

ci: run the documentation tests on docs-only pull requests - #1738

Merged
ItsNotRexed merged 1 commit into
ItsNotRexed:mainfrom
Kam471:ci/docs-only-doc-tests
Nov 22, 2026
Merged

ItsNotRexed merged 1 commit into
ItsNotRexed:mainfrom
Kam471:ci/docs-only-doc-tests

Conversation

@Kam471

@Kam471 Kam471 commented Nov 22, 2026

Copy link
Copy Markdown
Contributor

A docs-only PR currently skips the only tests that read the documentation.

ci.yml's change-scope job marks README.md, CONTRIBUTING.md, AGENTS.md and docs/**/*.md as docs-only, and every other job — including check — is then skipped. But check is the only job that runs:

  • tests/test_docs_links.py, which walks every tracked Markdown file (including the ones in that path list);
  • tests/test_i18n_index.py, which reads docs/i18n/README.md.

runtime.yml ignores docs/** and tests/**, no-game-data.yml only scans binary extensions, and jactionlint.yml only runs on .github/**, so nothing else covers them.

Proof

On a0acd33d (the ci.yml logic is identical at current main):

  1. Added [broken docs link](docs/does-not-exist.md) to README.md.
    • change-scope logic -> docs-only=true
    • python3 -I tests/test_docs_links.py -> FAIL: README.md: docs/does-not-exist.md (missing file)
  2. Added a duplicate fr row to docs/i18n/README.md.
    • change-scope logic -> docs-only=true
    • python3 -I tests/test_i18n_index.py -> FAIL: Lists differ: ['fr'] != []

Both broken states merge with green CI today. The proof commits were temporary and reset; this branch contains only the fix.

Fix

When docs-only is true, change-scope (ubuntu-latest, Python 3 preinstalled) runs the two standard-library checks. It adds a few seconds to a docs-only run and no time to code PRs, because the step is gated on the existing output.

Tests

python3 -I tests/test_docs_links.py   -> 5 tests, OK
python3 -I tests/test_i18n_index.py   -> 5 tests, OK
python -m compileall -q make_game.py tools tests -> exit 0
git diff --check origin/main..HEAD    -> clean

YAML was parsed and the new step's position/condition asserted locally. actionlint is not installed here, so the repo's jactionlint workflow will lint the .github/** change in CI.

Scope note: this does not overlap #800's runtime allow-list/test-discovery work or #801-#803. It is the documentation-only branch of the same issue.

@x2Tweek

x2Tweek commented Nov 22, 2026

Copy link
Copy Markdown
Contributor

Independent code review and test of PR #1738 (PROC-92)

Commit tested: 81fa469 (head of PR #1738, branch ci/docs-only-doc-tests)
Environment: Windows 11 Pro 10.0.26300, Python 3.15, no GPU, no game copy

What was verified

Static code review of .github/workflows/ci.yml:

CPU tests executed:

python -I tests/test_docs_links.py -v
python -I tests/test_i18n_index.py -v
python -m compileall -q tests/test_docs_links.py tests/test_i18n_index.py

Result: 5/5 OK (test_docs_links.py), 5/5 OK (test_i18n_index.py), compileall clean.

Conclusion

Static review found no correctness issues. The fix correctly closes the CI gap where docs-only changes bypassed the documentation tests. YAML is well-formed. AI-assisted. No GPU or game-corpus run claimed.

@ItsNotRexed
ItsNotRexed merged commit 69cb9d3 into ItsNotRexed:main Nov 22, 2026
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants