-
Notifications
You must be signed in to change notification settings - Fork 49
57 lines (52 loc) · 1.61 KB
/
test.yaml
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
55
56
57
name: Test
on:
push:
branches: [main]
tags:
- "v*" # Push events to matching v*, i.e. v1.0, v20.15.10
pull_request:
branches: "*"
jobs:
test:
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -e {0} # -e to fail on error
strategy:
fail-fast: false
matrix:
python: ["3.10", "3.12"]
os: [ubuntu-latest]
include:
- os: macos-latest
python: "3.10"
- os: macos-latest
python: "3.12"
pip-flags: "--pre"
name: "Python 3.12 (pre-release)"
env:
OS: ${{ matrix.os }}
PYTHON: ${{ matrix.python }}
steps:
- uses: actions/checkout@v2
- uses: astral-sh/setup-uv@v5
id: setup-uv
with:
version: "latest"
python-version: ${{ matrix.python }}
- name: Install dependencies
run: "uv sync --extra test"
- name: Test
env:
MPLBACKEND: agg
PLATFORM: ${{ matrix.os }}
DISPLAY: :42
run: |
uv run pytest --cov --color=yes --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
name: coverage
verbose: true
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}