[DOC] Updated README #79
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 Python Package | |
on: [push, pull_request] | |
jobs: | |
test: | |
env: | |
UV_CACHE_DIR: /tmp/.uv-cache | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
python: ["3.9", "3.10", "3.11", "3.12"] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout with submodules | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Install uv (UNIX) | |
if: ${{ matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest' }} | |
run: curl -LsSf https://astral.sh/uv/install.sh | sh | |
- name: Install uv (Windows) | |
if: ${{ matrix.os == 'windows-latest' }} | |
run: irm https://astral.sh/uv/install.ps1 | iex | |
shell: powershell | |
- name: Setup Python ${{ matrix.python }} | |
run: uv python install ${{ matrix.python }} | |
- name: Restore uv cache | |
uses: actions/cache@v4 | |
with: | |
path: /tmp/.uv-cache | |
key: uv-${{ runner.os }}-${{ hashFiles('uv.lock') }} | |
restore-keys: | | |
uv-${{ runner.os }}-${{ hashFiles('uv.lock') }} | |
uv-${{ runner.os }} | |
- name: Install dependencies | |
run: uv sync --dev | |
- name: Run tests | |
run: uv run pytest tests | |
- name: Minimize uv cache | |
run: uv cache prune --ci |