Adopt uv as Python package manager (#311) #98
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: Documentation | |
| on: | |
| push: | |
| branches: [ development ] | |
| paths: | |
| - 'doc/**' | |
| pull_request: | |
| branches: [ development ] | |
| paths: | |
| - 'doc/**' | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
| cancel-in-progress: true | |
| jobs: | |
| spelling: | |
| name: Spellcheck | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version-file: ".github/workflows/python-version.txt" | |
| cache: "pip" | |
| - name: Install system packages | |
| run: | | |
| sudo apt update | |
| sudo apt install -y enchant-2 hunspell aspell-en | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v5 | |
| - name: Install Dependencies | |
| run: uv sync --group doc --no-install-project | |
| - name: Spellcheck docs | |
| run: uv run make spelling | |
| working-directory: ./doc | |
| - name: Put spelling errors into summary file | |
| run: | | |
| if [ -z "$(find _build -type f -name '*.spelling')" ]; then | |
| echo "No spelling errors found." | |
| exit 0 | |
| fi | |
| echo "## Spellcheck results" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| for file in $(find _build -type f -name "*.spelling"); do | |
| sed 's/^/- /' < $file >> $GITHUB_STEP_SUMMARY | |
| done | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| working-directory: ./doc | |
| - name: Fail if there were spelling errors | |
| run: '! find _build -type f -name "*.spelling" | grep -q . || true' | |
| working-directory: ./doc | |
| linkcheck: | |
| name: Linkcheck | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version-file: ".github/workflows/python-version.txt" | |
| cache: "pip" | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v5 | |
| - name: Install Dependencies | |
| run: uv sync --group doc --no-install-project | |
| - name: Linkcheck docs | |
| run: uv run make linkcheck | |
| working-directory: ./doc | |
| - name: Put linkcheck result into summary | |
| run: | | |
| echo "## Linkcheck results" >> $GITHUB_STEP_SUMMARY | |
| sed 's/^/- /' < _build/linkcheck/output.txt >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| working-directory: ./doc | |
| if: always() |