Skip to content

use uv for installing requirements in CI #348

use uv for installing requirements in CI

use uv for installing requirements in CI #348

Workflow file for this run

name: Test website generation
on:
workflow_dispatch:
pull_request:
paths-ignore:
- "tests/**"
- "examples/**"
- "**.json"
- "**.csv"
- "**.html"
env:
PIP_DISABLE_PIP_VERSION_CHECK: 1
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
test-website:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Trick uv into thinking we've activated a venv
run: echo "VIRTUAL_ENV=${Python_ROOT_DIR}" >> $GITHUB_ENV
# we need to uninstall pip or uv complains about how setup-python
# has pip install twice for some reason??
- name: Install dependencies
run: |
python -m pip uninstall pip
curl -LsSf https://astral.sh/uv/install.sh | sh
uv pip install -e ".[docs]"
- run: uv pip freeze
- name: Regenerate examples and docs
run: python scripts/regenerate.py --download-typeshed
- name: Check the generated files with pre-commit
uses: pre-commit/action@v3.0.0
- name: Build docs
run: mkdocs build --strict
- name: Upload docs
uses: actions/upload-artifact@v4
with:
name: doc-html
path: site