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