Skip to content
Open
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
43 changes: 43 additions & 0 deletions .github/workflows/reusable-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,49 @@ jobs:
--fail-if-regression \
--fail-if-improved \
--fail-if-new-news-nit
- name: 'Collect HTML IDs'
run: python Doc/tools/check-html-ids.py collect Doc/build/html -o Doc/build/html-ids-head.json.gz
- name: 'Upload HTML IDs'
uses: actions/upload-artifact@v7
with:
name: html-ids-head
path: Doc/build/html-ids-head.json.gz
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is already compressed, we can skip zipping it:

https://github.blog/changelog/2026-02-26-github-actions-now-supports-uploading-and-downloading-non-zipped-artifacts/

Suggested change
path: Doc/build/html-ids-head.json.gz
path: Doc/build/html-ids-head.json.gz
archive: false

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, this is causing issues, I will look into it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hugo, FYI, this requires updtaing the name.

archive: false

check-html-ids:
name: 'Check for removed HTML IDs'
needs: build-doc
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: 'Check out base commit'
uses: actions/checkout@v6
with:
persist-credentials: false
ref: ${{ github.event.pull_request.base.sha || github.event.before }}
- name: 'Set up Python'
uses: actions/setup-python@v6
with:
python-version: '3'
cache: 'pip'
cache-dependency-path: 'Doc/requirements.txt'
- name: 'Install build dependencies'
run: make -C Doc/ venv
- name: 'Build HTML documentation'
run: make -C Doc/ SPHINXOPTS="--quiet" html
- name: 'Collect HTML IDs'
run: python Doc/tools/check-html-ids.py collect Doc/build/html -o /tmp/html-ids-base.json.gz
- name: 'Download PR base HTML IDs'
uses: actions/download-artifact@v8
with:
name: html-ids-head.json.gz
path: /tmp
- name: 'Check for removed HTML IDs'
run: >-
python Doc/tools/check-html-ids.py check
/tmp/html-ids-base.json.gz /tmp/html-ids-head.json.gz
# XXX: When an exclude file is added, update this to use it:
# --exclude-file Doc/tools/removed-ids.txt

# Run "doctest" on HEAD as new syntax doesn't exist in the latest stable release
doctest:
Expand Down
1 change: 1 addition & 0 deletions Doc/tools/check-html-ids.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ def verbose_print(*args, **kwargs):
)
if args.exclude_file:
print(f'Alternatively, add them to {args.exclude_file}.')
sys.exit(1)


if __name__ == '__main__':
Expand Down
Loading