-
Notifications
You must be signed in to change notification settings - Fork 187
54 lines (44 loc) · 1.3 KB
/
run-tests.yml
File metadata and controls
54 lines (44 loc) · 1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: Tests
on:
push:
pull_request:
branches:
- release
jobs:
build:
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
strategy:
fail-fast: false
max-parallel: 12
matrix:
python-version: ["3.11", "3.12", "3.13"]
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v6
- name: Set up uv
id: setup-uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
python-version: ${{ matrix.python-version }}
cache-dependency-glob: "**/pyproject.toml"
cache-suffix: "uv-${{ matrix.python-version }}-${{ matrix.os }}"
- name: Install dependencies
run: uv sync --group test --group build --extra extras
- name: Build package
run: uv build
- name: Set matplotlib backend
run: echo "MPLBACKEND=Agg" >> $GITHUB_ENV
- name: Running tests
run: uv run pytest --cov=. --cov-report=xml
- name: Upload coverage to Codecov
if: matrix.python-version == '3.12' && matrix.os == 'ubuntu-latest'
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
flags: unittests
name: codecov-umbrella