-
Notifications
You must be signed in to change notification settings - Fork 77
53 lines (49 loc) · 1.48 KB
/
test.yml
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
name: Test
on:
pull_request:
paths-ignore:
- 'doc/**'
- '.ci/**'
- '*.rst'
env:
CMAKE_ARGS: -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
# Latest Jupyter requires this to acknowledge deprecation
JUPYTER_PLATFORM_DIRS: 1
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
# version number must be string, otherwise 3.10 becomes 3.1
- os: windows-latest
python-version: "3.11"
installs: "numpy>=2"
- os: macos-14
python-version: "3.9"
installs: "numpy==1.21.0 scipy matplotlib"
- os: ubuntu-latest
python-version: "pypy-3.9"
- os: ubuntu-latest
python-version: "3.13"
installs: "'numpy>=2' scipy matplotlib"
fail-fast: false
steps:
- uses: actions/checkout@v4
with:
submodules: true
# must come after checkout
- uses: hendrikmuhs/ccache-action@v1.2
with:
key: ${{ github.job }}-${{ matrix.os }}-${{ matrix.python-version }}
- uses: rui314/setup-mold@v1
if: runner.os == 'Linux'
- uses: astral-sh/setup-uv@v3
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
# pip install .[test] is not used here to test minimum (faster)
# cov workflow runs all tests
- run: uv pip install --system . pytest pytest-xdist ${{ matrix.installs }}
- run: python -m pytest -n 3