name: test package
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
- name: Install the project
run: |
# Generate lockfile if it doesn't exist
if [ ! -f "uv.lock" ]; then
uv lock
fi
uv sync --frozen --all-extras --dev --python ${{ matrix.python-version }}
- name: Run pytest
run: uv run --no-sync pytest