1+ defaults :
2+ run :
3+ shell : bash -leo pipefail {0}
4+
5+ concurrency :
6+ group : ${{ github.head_ref }}
7+ cancel-in-progress : true
8+
19jobs :
210 test :
3- defaults :
4- run :
5- shell : bash -el {0}
611 strategy :
712 matrix :
813 os : [ubuntu-latest]
1823 python : ' 3.10'
1924 numba_boundscheck : 1
2025 - os : ubuntu-latest
26+ python : ' 3.10'
2127 pip_opts : " --pre -U"
2228 fail-fast : false
2329 runs-on : ${{ matrix.os }}
@@ -27,65 +33,33 @@ jobs:
2733 steps :
2834 - name : Checkout Repo
2935 uses : actions/checkout@v4
30- - name : Cache conda
31- uses : actions/cache@v4
32- env :
33- # Increase this value to reset cache if ci/environment.yml has not changed
34- CACHE_NUMBER : 0
35- with :
36- path : ~/conda_pkgs_dir
37- key :
38- test-${{ matrix.os }}-conda-py${{ matrix.python }}-${{ env.CACHE_NUMBER }}-${{
39- hashFiles('ci/environment.yml') }}
40- - uses : julia-actions/setup-julia@v1
41- with :
42- version : ' 1.10.0'
43- - uses : conda-incubator/setup-miniconda@v3
36+ - name : Set up Python
37+ uses : actions/setup-python@v5
4438 with :
45- activate-environment : sparse-dev
46- allow-softlinks : true
47- environment-file : ci/environment.yml
4839 python-version : ${{ matrix.python }}
49- miniforge-version : latest
40+ cache : ' pip '
5041 - name : Install package
5142 run : |
5243 pip install -e .[tests]
5344 pip install ${{ matrix.pip_opts }} numpy numba
5445 - name : Run tests
5546 run : |
56- SPARSE_BACKEND=Numba pytest --pyargs sparse
57- SPARSE_BACKEND=Finch pytest --pyargs sparse/tests
47+ SPARSE_BACKEND=Numba pytest --pyargs sparse --cov-report=xml:coverage_Numba.xml -n 4 -vvv
48+ SPARSE_BACKEND=Finch pytest --pyargs sparse/tests --cov-report=xml:coverage_Finch.xml -n 4 -vvv
5849 - uses : codecov/codecov-action@v4
5950 if : always()
60- - name : Publish Test Results
61- uses : EnricoMi/publish-unit-test-result-action/composite@v2
62- if : always()
6351 with :
64- files : " **/test- *.xml"
52+ files : ./ **/coverage *.xml
6553 docs :
66- defaults :
67- run :
68- shell : bash -el {0}
6954 runs-on : ubuntu-latest
7055 steps :
7156 - name : Checkout Repo
7257 uses : actions/checkout@v4
73- - name : Cache conda
74- uses : actions/cache@v4
75- env :
76- # Increase this value to reset cache if ci/environment.yml has not changed
77- CACHE_NUMBER : 0
78- with :
79- path : ~/conda_pkgs_dir
80- key :
81- docs-conda-${{ env.CACHE_NUMBER }}-${{ hashFiles('ci/environment.yml') }}
82- - uses : conda-incubator/setup-miniconda@v3
58+ - name : Set up Python
59+ uses : actions/setup-python@v5
8360 with :
84- activate-environment : sparse-dev
85- allow-softlinks : true
86- environment-file : ci/environment.yml
8761 python-version : ' 3.10'
88- miniforge-version : latest
62+ cache : ' pip '
8963 - name : Install package
9064 run : |
9165 pip install -e .[docs]
@@ -97,29 +71,15 @@ jobs:
9771 name : Documentation
9872 path : _build/html
9973 benchmarks :
100- defaults :
101- run :
102- shell : bash -el {0}
10374 runs-on : ubuntu-latest
10475 steps :
10576 - name : Checkout Repo
10677 uses : actions/checkout@v4
107- - name : Cache conda
108- uses : actions/cache@v4
109- env :
110- # Increase this value to reset cache if ci/environment.yml has not changed
111- CACHE_NUMBER : 0
112- with :
113- path : ~/conda_pkgs_dir
114- key :
115- benchmarks-${{ env.CACHE_NUMBER }}-${{ hashFiles('ci/environment.yml') }}
116- - uses : conda-incubator/setup-miniconda@v3
78+ - name : Set up Python
79+ uses : actions/setup-python@v5
11780 with :
118- activate-environment : sparse-dev
119- allow-softlinks : true
120- environment-file : ci/environment.yml
12181 python-version : ' 3.10'
122- miniforge-version : latest
82+ cache : ' pip '
12383 - name : Install asv
12484 run : |
12585 pip install asv
@@ -133,11 +93,13 @@ jobs:
13393 - name : Checkout Repo
13494 uses : actions/checkout@v4
13595 - name : Set up Python
136- uses : actions/setup-python@v5.1.0
96+ uses : actions/setup-python@v5
13797 with :
13898 python-version : ' 3.11'
99+ cache : ' pip'
139100 - name : Build and install Sparse
140101 run : |
102+ pip install -U setuptools wheel
141103 python -m pip install '.[finch]' scipy
142104 - name : Run examples
143105 run : |
@@ -159,9 +121,10 @@ jobs:
159121 submodules : ' true'
160122 path : ' array-api-tests'
161123 - name : Set up Python
162- uses : actions/setup-python@v5.1.0
124+ uses : actions/setup-python@v5
163125 with :
164126 python-version : ' 3.11'
127+ cache : ' pip'
165128 - name : Install build and test dependencies from PyPI
166129 run : |
167130 python -m pip install pytest-xdist -r array-api-tests/requirements.txt
0 commit comments