|
7 | 7 | - 'v*' |
8 | 8 | pull_request: |
9 | 9 |
|
| 10 | +env: |
| 11 | + PY_COLORS: 1 |
| 12 | + FORCE_COLOR: True |
| 13 | + |
10 | 14 | jobs: |
11 | 15 | pre-commit: |
12 | 16 | runs-on: ubuntu-latest |
|
75 | 79 | run: | |
76 | 80 | python -m pip install --upgrade pip |
77 | 81 | pip install -e .[doc] |
78 | | - - name: Build documentation |
| 82 | +
|
| 83 | + - name: Check for broken links |
| 84 | + run: > |
| 85 | + sphinx-build -b linkcheck docs docs/_build/linkcheck |
| 86 | +
|
| 87 | + - name: Build documentation to audit |
79 | 88 | run: > |
80 | 89 | sphinx-build -b html docs docs/_build/html -w warnings.txt |
| 90 | +
|
81 | 91 | - name: Check that there are no unexpected warnings |
82 | 92 | shell: python |
83 | 93 | run: | |
|
87 | 97 | unexpected = [ii for ii in text.split("\n") if "kitchen-sink" not in ii] |
88 | 98 | assert len(unexpected) == 0 |
89 | 99 |
|
90 | | - # Ref: https://github.com/lycheeverse/lychee-action |
91 | | - # Excluded files: |
92 | | - # - nature.com: DOI redirect works but errors anyway |
93 | | - # - doi.org: DOI redirect works but errors anyway |
94 | | - # - yahoo.com: Kitchen sink redirect we don't control |
95 | | - # - someurl: dummy url |
96 | | - # - mailto: fails test but works for people |
97 | | - # - pathto(: because the pydata theme packages invalid HTML w/ this in it |
98 | | - # - mybinder.org: because Binder sometimes incorrectly doesn't respond |
99 | | - # - github.com/search: because GitHub search results return a network error |
100 | | - - name: Check for broken links |
101 | | - id: lychee |
102 | | - uses: lycheeverse/lychee-action@v1.4.1 |
103 | | - env: |
104 | | - GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} |
105 | | - with: |
106 | | - fail: true |
107 | | - args: > |
108 | | - './docs/_build/html/**/*.html' |
109 | | - --exclude 'nature.com' |
110 | | - --exclude 'doi.org' |
111 | | - --exclude 'yahoo.com' |
112 | | - --exclude 'someurl' |
113 | | - --exclude 'mailto:docutils-develop' |
114 | | - --exclude 'pathto\(' |
115 | | - --exclude 'mybinder.org' |
116 | | - --exclude 'github.com/search' |
117 | | -
|
118 | 100 | - name: Audit with Lighthouse |
119 | 101 | uses: treosh/lighthouse-ci-action@9.3.0 |
120 | 102 | with: |
|
0 commit comments