forked from python/cpython
-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (41 loc) · 1.33 KB
/
reusable-check-html-ids.yml
File metadata and controls
45 lines (41 loc) · 1.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: Reusable Check HTML IDs Check
on:
workflow_call:
permissions:
contents: read
env:
FORCE_COLOR: 1
jobs:
check-html-ids:
name: 'Check for removed HTML IDs'
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 }}
- 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