|  | 
| 23 | 23 |     paths: | 
| 24 | 24 |     - 'Doc/**' | 
| 25 | 25 |     - 'Misc/**' | 
|  | 26 | +    - '.github/workflows/doc.yml' | 
| 26 | 27 | 
 | 
| 27 | 28 | permissions: | 
| 28 | 29 |   contents: read | 
|  | 
| 35 | 36 |     - uses: actions/checkout@v3 | 
| 36 | 37 |     - name: Register Sphinx problem matcher | 
| 37 | 38 |       run: echo "::add-matcher::.github/problem-matchers/sphinx.json" | 
|  | 39 | +    - name: 'Set up Python' | 
|  | 40 | +      uses: actions/setup-python@v4 | 
|  | 41 | +      with: | 
|  | 42 | +        python-version: '3' | 
|  | 43 | +        cache: 'pip' | 
|  | 44 | +        cache-dependency-path: 'Doc/requirements.txt' | 
|  | 45 | +    - name: 'Install build dependencies' | 
|  | 46 | +      run: make -C Doc/ venv | 
|  | 47 | +    - name: 'Check documentation' | 
|  | 48 | +      run: make -C Doc/ check | 
|  | 49 | +    - name: 'Build HTML documentation' | 
|  | 50 | +      run: make -C Doc/ SPHINXOPTS="-q" SPHINXERRORHANDLING="-W --keep-going" html | 
|  | 51 | +    - name: 'Upload' | 
|  | 52 | +      uses: actions/upload-artifact@v3 | 
|  | 53 | +      with: | 
|  | 54 | +        name: doc-html | 
|  | 55 | +        path: Doc/build/html | 
|  | 56 | + | 
|  | 57 | +  # Run "doctest" on HEAD as new syntax doesn't exist in the latest stable release | 
|  | 58 | +  doctest: | 
|  | 59 | +    name: 'Doctest' | 
|  | 60 | +    runs-on: ubuntu-latest | 
|  | 61 | +    steps: | 
|  | 62 | +    - uses: actions/checkout@v3 | 
|  | 63 | +    - name: Register Sphinx problem matcher | 
|  | 64 | +      run: echo "::add-matcher::.github/problem-matchers/sphinx.json" | 
|  | 65 | +    - uses: actions/cache@v3 | 
|  | 66 | +      with: | 
|  | 67 | +        path: ~/.cache/pip | 
|  | 68 | +        key: ubuntu-doc-${{ hashFiles('Doc/requirements.txt') }} | 
|  | 69 | +        restore-keys: | | 
|  | 70 | +          ubuntu-doc- | 
| 38 | 71 |     - name: 'Install Dependencies' | 
| 39 | 72 |       run: sudo ./.github/workflows/posix-deps-apt.sh && sudo apt-get install wamerican | 
| 40 | 73 |     - name: 'Configure CPython' | 
|  | 
| 43 | 76 |       run: make -j4 | 
| 44 | 77 |     - name: 'Install build dependencies' | 
| 45 | 78 |       run: make -C Doc/ PYTHON=../python venv | 
| 46 |  | -    # Run "check doctest html" as 3 steps to get a more readable output | 
| 47 |  | -    # in the web UI | 
| 48 |  | -    - name: 'Check documentation' | 
| 49 |  | -      run: make -C Doc/ PYTHON=../python SPHINXOPTS="-q -W --keep-going" check | 
| 50 | 79 |     # Use "xvfb-run" since some doctest tests open GUI windows | 
| 51 | 80 |     - name: 'Run documentation doctest' | 
| 52 |  | -      run: xvfb-run make -C Doc/ PYTHON=../python SPHINXOPTS="-q -W --keep-going" doctest | 
| 53 |  | -    - name: 'Build HTML documentation' | 
| 54 |  | -      run: make -C Doc/ PYTHON=../python SPHINXOPTS="-q -W --keep-going" html | 
| 55 |  | -    - name: 'Upload' | 
| 56 |  | -      uses: actions/upload-artifact@v3 | 
| 57 |  | -      with: | 
| 58 |  | -        name: doc-html | 
| 59 |  | -        path: Doc/build/html | 
|  | 81 | +      run: xvfb-run make -C Doc/ PYTHON=../python SPHINXOPTS="-q" SPHINXERRORHANDLING="-W --keep-going" doctest | 
0 commit comments