5
5
runs-on : ubuntu-latest
6
6
strategy :
7
7
matrix :
8
- python-version : ['3.9', '3.10', '3.11', '3.12']
9
- numpy-version : ['1.21', '1.26', '2.0', 'dev']
10
- exclude :
8
+ include :
9
+ - python-version : ' 3.10'
10
+ numpy-version : ' 1.22'
11
+ - python-version : ' 3.10'
12
+ numpy-version : ' 1.26'
13
+ - python-version : ' 3.10'
14
+ numpy-version : ' latest'
11
15
- python-version : ' 3.11'
12
- numpy-version : ' 1.21 '
16
+ numpy-version : ' dev '
13
17
- python-version : ' 3.12'
14
- numpy-version : ' 1.21'
15
- fail-fast : true
18
+ numpy-version : ' 1.22'
19
+ - python-version : ' 3.12'
20
+ numpy-version : ' 1.26'
21
+ - python-version : ' 3.13'
22
+ numpy-version : ' latest'
23
+ - python-version : ' 3.13'
24
+ numpy-version : ' dev'
25
+
26
+ fail-fast : false
16
27
steps :
17
28
- uses : actions/checkout@v4
18
29
- uses : actions/setup-python@v5
@@ -22,21 +33,27 @@ jobs:
22
33
run : |
23
34
python -m pip install --upgrade pip
24
35
if [ "${{ matrix.numpy-version }}" == "dev" ]; then
25
- PIP_EXTRA='numpy --pre --extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple'
26
- elif [ "${{ matrix.numpy-version }}" == "1.21" ]; then
27
- PIP_EXTRA='numpy==1.21.*'
36
+ python -m pip install pytest
37
+ python -m pip install numpy --pre --extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple
38
+ elif [ "${{ matrix.numpy-version }}" == "1.22" ]; then
39
+ python -m pip install pytest numpy==1.22.*
40
+ elif [ "${{ matrix.numpy-version }}" == "1.26" ]; then
41
+ python -m pip install pytest numpy==1.26.*
28
42
else
29
- PIP_EXTRA='numpy==1.26.*'
43
+ # Don't pip install .[dev] as it would pull in the whole torch cuda stack
44
+ python -m pip install \
45
+ array-api-strict \
46
+ dask[array] \
47
+ jax[cpu] \
48
+ numpy \
49
+ pytest \
50
+ sparse \
51
+ ndonnx \
52
+ python -m -pip install torch --index-url https://download.pytorch.org/whl/cpu
30
53
fi
31
54
32
- python -m pip install .[dev] $PIP_EXTRA
55
+ - name : Test it installs
56
+ run : python -m pip install .
33
57
34
58
- name : Run Tests
35
- run : |
36
- if [[ "${{ matrix.numpy-version }}" == "1.21" || "${{ matrix.numpy-version }}" == "dev" ]]; then
37
- PYTEST_EXTRA=(-k "numpy and not jax and not torch and not dask and not sparse")
38
- fi
39
- pytest -v "${PYTEST_EXTRA[@]}"
40
-
41
- # Make sure it installs
42
- python -m pip install .
59
+ run : pytest -v
0 commit comments