@@ -28,35 +28,28 @@ jobs:
2828 cache-dependency-path : ' Doc/requirements.txt'
2929 - name : ' Install build dependencies'
3030 run : make -C Doc/ venv
31- - name : ' Build HTML documentation'
32- run : make -C Doc/ SPHINXOPTS="-q" SPHINXERRORHANDLING="-W --keep-going" html
3331
34- # Add pull request annotations for Sphinx nitpicks (missing references)
32+ # To annotate PRs with Sphinx nitpicks (missing references)
3533 - name : ' Get list of changed files'
3634 if : github.event_name == 'pull_request'
3735 id : changed_files
38363937 with :
4038 filter : " Doc/**"
4139 format : csv # works for paths with spaces
42- - name : ' Build changed files in nit-picky mode'
43- if : github.event_name == 'pull_request'
40+ - name : ' Build HTML documentation'
4441 continue-on-error : true
4542 run : |
4643 set -Eeuo pipefail
47- # Mark files the pull request modified
48- python Doc/tools/touch-clean-files.py --clean '${{ steps.changed_files.outputs.added_modified }}'
49- # Build docs with the '-n' (nit-picky) option; convert warnings to annotations
50- make -C Doc/ PYTHON=../python SPHINXOPTS="-q -n --keep-going" html 2>&1 |
51- python Doc/tools/warnings-to-gh-actions.py
52-
53- # Ensure some files always pass Sphinx nit-picky mode (no missing references)
54- - name : ' Build known-good files in nit-picky mode'
44+ # Build docs with the '-n' (nit-picky) option; write warnings to file
45+ make -C Doc/ PYTHON=../python SPHINXOPTS="-q -n -W --keep-going -w sphinx-warnings.txt" html
46+ - name : ' Check warnings'
47+ if : github.event_name == 'pull_request'
5548 run : |
56- # Mark files that must pass nit-picky
57- python Doc/tools/touch-clean-files.py
58- # Build docs with the '-n' (nit-picky) option, convert warnings to errors (-W)
59- make -C Doc/ PYTHON=../python SPHINXOPTS="-q -n -W --keep-going" html 2>&1
49+ python Doc/tools/check-warnings.py \
50+ --check-and-annotate '${{ steps.changed_files.outputs.added_modified }}' \
51+ --fail-if-regression \
52+ --fail-if-improved
6053
6154 # This build doesn't use problem matchers or check annotations
6255 build_doc_oldest_supported_sphinx :
0 commit comments