Skip to content

Commit f40e9ff

Browse files
[doc] Add a CI check for the doc being properly generated (#6736)
And cleanup the doc about dev installation for contributors. Co-authored-by: Jacob Walls <[email protected]>
1 parent 466fb76 commit f40e9ff

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed

.github/workflows/checks.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,4 +182,8 @@ jobs:
182182
run: |
183183
. venv/bin/activate
184184
cd doc
185-
make html
185+
pre-commit run --hook-stage push sphinx-generated-doc --all-files || {
186+
git diff ; \
187+
echo "Make sure that there are no modifications locally when launching 'make html'" ; \
188+
exit 1; \
189+
}

.pre-commit-config.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,13 @@ repos:
9494
args: ["-rn", "-sn", "--rcfile=pylintrc", "--fail-on=I", "--spelling-dict=en"]
9595
exclude: tests(/\w*)*/functional/|tests/input|tests(/\w*)*data/|doc/
9696
stages: [manual]
97+
- id: sphinx-generated-doc
98+
alias: sphinx-generated-doc
99+
name: sphinx-generated-doc
100+
entry: make -C doc/ html
101+
pass_filenames: false
102+
language: system
103+
stages: [push]
97104
- id: check-newsfragments
98105
name: Check newsfragments
99106
entry: python3 -m script.check_newsfragments

doc/development_guide/contributor_guide/tests/install.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ This ensures your testing environment is similar to Pylint's testing environment
2828
pre-commit hooks which should take care of the autoformatting for you before each
2929
commit. To enable it, run ``pre-commit install`` in the ``pylint`` root directory.
3030

31+
**Even more optionally**: You can enable slow on push hooks with ``pre-commit install --install-hooks -t pre-push``.
32+
It will do slow checks like checking that the generated documentation is up to date
33+
before each push.
34+
3135
Astroid installation
3236
--------------------
3337

0 commit comments

Comments
 (0)