chore(deps): autoupdate pre-commit hooks #24
This file contains 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: Build Documentation | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- "**" | |
jobs: | |
build: | |
name: Run static type checks (Pyright) | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up base Python | |
uses: actions/setup-python@v5 | |
with: | |
# Note that this is just the version of Python that we use to run `uv` with. | |
# `uv` manages its own version of Python. | |
# For speed, we use the same version for both, but in principle these could differ. | |
python-version: 3.12 | |
- name: Set up uv cache directory location (Linux/Mac) | |
run: echo "UV_CACHE_DIR=${{ runner.temp }}/.uv-cache" >> $GITHUB_ENV | |
if: runner.os != 'Windows' | |
- name: Set up uv cache directory location (Windows) | |
run: echo "UV_CACHE_DIR=${{ runner.temp }}/.uv-cache" >> $env:GITHUB_ENV | |
if: runner.os == 'Windows' | |
- name: Restore uv cache | |
uses: actions/cache@v4 | |
with: | |
path: ${{ env.UV_CACHE_DIR }} | |
key: uv-${{ runner.os }}-${{ hashFiles('uv.lock') }}-${{ matrix.python-version }}-dev | |
restore-keys: | | |
uv-${{ runner.os }}-${{ hashFiles('uv.lock') }}-${{ matrix.python-version }} | |
uv-${{ runner.os }}-${{ hashFiles('uv.lock') }} | |
uv-${{ runner.os }} | |
- name: Install latest versions of pip and uv | |
run: python -m pip install --upgrade pip uv | |
- name: Install dev dependencies | |
run: uv sync --dev --locked | |
- name: Debug - uv pip freeze | |
run: uv pip freeze | |
- name: Run Pyright | |
# Currently only the `coreax` and `examples` directories are expected to pass. | |
run: uv run pyright coreax examples | |
- name: Minimize UV cache | |
run: uv cache prune --ci | |
if: always() |