40 lines
936 B
YAML
40 lines
936 B
YAML
name: unit-tests
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
workflow_dispatch:
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
unit-tests:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
|
|
continue-on-error: true
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Install uv
|
|
uses: astral-sh/setup-uv@v6
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
|
|
- name: install dependencies
|
|
run: uv sync
|
|
|
|
- name: Install test-only dependencies (Python 3.9 and 3.13)
|
|
if: matrix.python-version == '3.9' || matrix.python-version == '3.13'
|
|
run: uv sync --group tests
|
|
|
|
- name: Unit tests
|
|
run: uv run pytest tests/
|