42 lines
1,004 B
YAML
42 lines
1,004 B
YAML
name: Pytest
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
workflow_dispatch:
|
|
schedule:
|
|
- cron: '0 4 1 * *'
|
|
|
|
jobs:
|
|
pytest:
|
|
strategy:
|
|
matrix:
|
|
python-version:
|
|
- "3.10"
|
|
- "3.11"
|
|
- "3.12"
|
|
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
UV_PYTHON: ${{ matrix.python-version }}
|
|
steps:
|
|
- name: Check out the repository
|
|
uses: https://github.com/RouxAntoine/checkout@v4.1.8
|
|
with:
|
|
show-progress: true
|
|
- name: Install uv
|
|
uses: astral-sh/setup-uv@v7
|
|
- 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 corrlib
|
|
run: uv sync --all-extras --dev
|
|
- name: Run tests
|
|
run: uv run pytest tests
|
|
- name: Minimize uv cache
|
|
run: uv cache prune --ci
|