Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[doc] Add a CI check for the doc being properly generated #6736

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .github/workflows/checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -182,4 +182,8 @@ jobs:
run: |
. venv/bin/activate
cd doc
make html
pre-commit run --hook-stage push sphinx-generated-doc --all-files || {
git diff ; \
echo "Make sure that there are no modifications locally when launching 'make html'" ; \
exit 1; \
}
7 changes: 7 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,13 @@ repos:
args: ["-rn", "-sn", "--rcfile=pylintrc", "--fail-on=I", "--spelling-dict=en"]
exclude: tests(/\w*)*/functional/|tests/input|tests(/\w*)*data/|doc/
stages: [manual]
- id: sphinx-generated-doc
alias: sphinx-generated-doc
name: sphinx-generated-doc
entry: make -C doc/ html
pass_filenames: false
language: system
stages: [push]
- id: check-newsfragments
name: Check newsfragments
entry: python3 -m script.check_newsfragments
Expand Down
4 changes: 4 additions & 0 deletions doc/development_guide/contributor_guide/tests/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ This ensures your testing environment is similar to Pylint's testing environment
pre-commit hooks which should take care of the autoformatting for you before each
commit. To enable it, run ``pre-commit install`` in the ``pylint`` root directory.

**Even more optionally**: You can enable slow on push hooks with ``pre-commit install --install-hooks -t pre-push``.
Pierre-Sassoulas marked this conversation as resolved.
Show resolved Hide resolved
It will do slow checks like checking that the generated documentation is up to date
before each push.

Astroid installation
--------------------

Expand Down