summaryrefslogtreecommitdiffstats
path: root/.github
diff options
context:
space:
mode:
authorHugo van Kemenade <hugovk@users.noreply.github.com>2023-03-24 11:23:35 (GMT)
committerGitHub <noreply@github.com>2023-03-24 11:23:35 (GMT)
commit6a1c49a7176f29435e71a326866d952b686bceb3 (patch)
treefd69f14a8c3316a3eed95e09f6ef9cfc5d2bcfe3 /.github
parentd49409196e0c73c38e3f96cf860cbffda40607ec (diff)
downloadcpython-6a1c49a7176f29435e71a326866d952b686bceb3.zip
cpython-6a1c49a7176f29435e71a326866d952b686bceb3.tar.gz
cpython-6a1c49a7176f29435e71a326866d952b686bceb3.tar.bz2
gh-101100: Test docs in nit-picky mode (#102513)
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM> Co-authored-by: Petr Viktorin <encukou@gmail.com>
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/doc.yml22
1 files changed, 22 insertions, 0 deletions
diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml
index 465da12..9ec60c1 100644
--- a/.github/workflows/doc.yml
+++ b/.github/workflows/doc.yml
@@ -53,6 +53,28 @@ jobs:
- name: 'Build HTML documentation'
run: make -C Doc/ SPHINXOPTS="-q" SPHINXERRORHANDLING="-W --keep-going" html
+ # Add pull request annotations for Sphinx nitpicks (missing references)
+ - name: 'Get list of changed files'
+ id: changed_files
+ uses: Ana06/get-changed-files@v2.2.0
+ - name: 'Build changed files in nit-picky mode'
+ continue-on-error: true
+ run: |
+ # Mark files the pull request modified
+ touch ${{ steps.changed_files.outputs.added_modified }}
+ # Build docs with the '-n' (nit-picky) option; convert warnings to annotations
+ make -C Doc/ PYTHON=../python SPHINXOPTS="-q -n --keep-going" html 2>&1 |
+ python Doc/tools/warnings-to-gh-actions.py
+
+ # Ensure some files always pass Sphinx nit-picky mode (no missing references)
+ - name: 'Build known-good files in nit-picky mode'
+ run: |
+ # Mark files that must pass nit-picky
+ touch Doc/whatsnew/3.12.rst
+ touch Doc/library/sqlite3.rst
+ # Build docs with the '-n' (nit-picky) option, convert warnings to errors (-W)
+ make -C Doc/ PYTHON=../python SPHINXOPTS="-q -n -W --keep-going" html 2>&1
+
# Run "doctest" on HEAD as new syntax doesn't exist in the latest stable release
doctest:
name: 'Doctest'