chore(deps): autoupdate uv.lock #164
Workflow file for this run
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: Test with lowest supported versions | |
# Testing with the lowest supported versions ensures that our dependency list is accurate - if our code works | |
# with the lowest and highest supported versions, it is likely that it also works with intermediate versions | |
# as well. | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- "**" | |
jobs: | |
tests: | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: | |
- "3.9" | |
- "3.10" | |
- "3.11" | |
- "3.12" | |
- "3.13" | |
os: | |
- ubuntu-latest | |
- windows-latest | |
- macos-latest | |
runs-on: ${{ matrix.os }} | |
env: | |
# Set the Python version that `uv` will use for its virtual environment. | |
UV_PYTHON: ${{ matrix.python-version }} | |
# Set `uv`'s resolution strategy to "lowest", which resolves the lowest compatible version of any direct | |
# dependencies. | |
UV_RESOLUTION: lowest | |
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.9 | |
- 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') }}-3.9_LOWEST-test | |
restore-keys: | | |
uv-${{ runner.os }}-${{ hashFiles('uv.lock') }}-3.9_LOWEST | |
uv-${{ runner.os }}-${{ hashFiles('uv.lock') }} | |
uv-${{ runner.os }} | |
- name: Upgrade pip | |
run: python -m pip install --upgrade pip | |
- name: Install uv | |
run: pip install uv | |
- name: Install test dependencies (lowest compatible) | |
run: uv sync --extra test --no-dev | |
- name: Debug - uv pip freeze | |
run: uv pip freeze | |
- name: Run all tests | |
run: > | |
uv run --frozen --no-dev pytest | |
--ignore=tests/test_examples.py | |
-W "error::vanguard.utils.UnseededRandomWarning" | |
- name: Minimize UV cache | |
run: uv cache prune --ci | |
if: always() |