Documentation tests #12
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: test-docs | |
| run-name: Documentation tests | |
| on: | |
| pull_request: | |
| push: | |
| branches: [main] | |
| permissions: | |
| contents: read | |
| env: | |
| HATCH_ENV_TYPE_VIRTUAL_PATH: ${{ github.workspace }}/.hatch_envs | |
| jobs: | |
| doc-test: | |
| name: Sphinx Documentation Tests | |
| runs-on: ubuntu-latest | |
| if: "!contains(github.event.pull_request.labels.*.name, 'ci | skip')" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| persist-credentials: false | |
| - uses: ./.github/actions/setup-docs-env | |
| - name: Run sphinx html builder | |
| run: hatch run docs:html -W | |
| - name: Cache linkcheck results | |
| uses: actions/cache@v4 | |
| with: | |
| path: docs/_build/linkcheck_cache.json | |
| key: linkcheck | |
| - name: Run sphinx linkcheck | |
| run: hatch run docs:linkcheck | |
| - name: Run Sphinx ReST linter | |
| run: hatch run docs:sphinx-rest-linter |