Skip to content

willbakst is testing the package #616

willbakst is testing the package

willbakst is testing the package #616

Workflow file for this run

name: tests
run-name: ${{ github.actor }} is testing the package
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
tests:
name: Tests
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
python-version: ["3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v3
- name: Set up uv
shell: bash
run: |
if [ "$RUNNER_OS" == "Windows" ]
then
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/0.5.6/install.ps1 | iex"
else
curl -LsSf https://astral.sh/uv/0.5.6/install.sh | sh
fi
- name: Set up Python ${{ matrix.python-version }}
run: |
uv python install ${{ matrix.python-version }}
echo "${{ matrix.python-version }}" > .python-version
- 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 the project
run: uv sync --all-extras --dev
- name: Run Tests
run: uv run pytest tests/ --cov=./ --cov-report=xml
- name: Minimize uv cache
run: uv cache prune --ci