mirror of
https://github.com/python/cpython
synced 2026-09-29 09:55:31 +03:00
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>
This commit is contained in:
parent
d49409196e
commit
6a1c49a717
8 changed files with 116 additions and 46 deletions
22
.github/workflows/doc.yml
vendored
22
.github/workflows/doc.yml
vendored
|
|
@ -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'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue