📝 Update tox config #374
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: ci | |
| on: | |
| pull_request: | |
| push: | |
| branches: [main] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| permissions: {} | |
| jobs: | |
| prek: | |
| name: prek | |
| # External pull requests should be checked, but not our own internal pull | |
| # requests again, as these are already checked by the push on the branch. | |
| # Without this if condition, the checks would be performed twice, as | |
| # internal pull requests correspond to both the push and pull_request | |
| # events. | |
| if: | |
| github.event_name == 'push' || | |
| github.event.pull_request.head.repo.full_name != github.repository | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| persist-credentials: false | |
| - uses: j178/prek-action@e98a699c41eb69ab013a45817a0406469a748f8d # v2.0.5 | |
| docs: | |
| name: Build docs and check links | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| persist-credentials: false | |
| - uses: pandoc/actions/setup@86321b6dd4675f5014c611e05088e10d4939e09e # v1.1.1 | |
| - uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0 | |
| with: | |
| # Keep in sync with .readthedocs.yaml | |
| python-version-file: .python-version | |
| - name: Install plantuml | |
| run: | | |
| sudo apt install plantuml | |
| - name: Setup cached uv | |
| uses: hynek/setup-cached-uv@4300ec2180bc77d705e626a34e381b81a4772c51 # v2.5.0 | |
| - name: Create venv and install docs dependencies | |
| run: | | |
| uv venv | |
| echo "$PWD/.venv/bin" >> $GITHUB_PATH | |
| uv sync --group docs | |
| - name: Build HTML and check links | |
| run: | | |
| uv run make html | |
| uv run make linkcheck | |
| working-directory: docs/ |