File tree Expand file tree Collapse file tree 4 files changed +11
-12
lines changed Expand file tree Collapse file tree 4 files changed +11
-12
lines changed Original file line number Diff line number Diff line change @@ -93,25 +93,22 @@ jobs:
93
93
matrix :
94
94
backend : ['Numba', 'Finch']
95
95
fail-fast : false
96
+ env :
97
+ ARRAY_API_TESTS_DIR : ${{ github.workspace }}/array-api-tests
96
98
runs-on : ubuntu-latest
97
99
steps :
98
100
- name : Checkout Repo
99
101
uses : actions/checkout@v4
100
102
- name : Checkout array-api-tests
101
- uses : actions/checkout@v4
102
- with :
103
- repository : data-apis/array-api-tests
104
- ref : ' 33f2d2ea2f3dd2b3ceeeb4519d55e08096184149' # Latest commit as of 2024-05-29
105
- submodules : ' true'
106
- path : ' array-api-tests'
103
+ run : ci/clone_array_api_tests.sh
107
104
- name : Set up Python
108
105
uses : actions/setup-python@v5
109
106
with :
110
107
python-version : ' 3.11'
111
108
cache : ' pip'
112
109
- name : Install build and test dependencies from PyPI
113
110
run : |
114
- pip install pytest-xdist -r array-api-tests /requirements.txt
111
+ pip install pytest-xdist -r "$ARRAY_API_TESTS_DIR /requirements.txt"
115
112
- name : Build and install Sparse
116
113
run : |
117
114
pip install '.[finch]'
Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env bash
2
2
set -euxo pipefail
3
3
4
- if [ ! -d " ../array-api-tests" ]; then
5
- git clone https://github.com/data-apis/array-api-tests.git " ../array-api-tests"
4
+ ARRAY_API_TESTS_DIR=" ${ARRAY_API_TESTS_DIR:- " ../array-api-tests" } "
5
+ if [ ! -d " $ARRAY_API_TESTS_DIR " ]; then
6
+ git clone --recursive https://github.com/data-apis/array-api-tests.git " $ARRAY_API_TESTS_DIR "
6
7
fi
7
- git --git-dir=" ../array-api-tests/.git" fetch
8
- git --git-dir=" ../array-api-tests/.git" checkout $( cat " ci/array-api-tests-rev.txt" )
8
+
9
+ git --git-dir=" $ARRAY_API_TESTS_DIR /.git" fetch
10
+ git --git-dir=" $ARRAY_API_TESTS_DIR /.git" reset --hard $( cat " ci/array-api-tests-rev.txt" )
Original file line number Diff line number Diff line change @@ -6,4 +6,4 @@ source ci/clone_array_api_tests.sh
6
6
if [ " ${SPARSE_BACKEND} " = " Finch" ]; then
7
7
python -c ' import finch'
8
8
fi
9
- ARRAY_API_TESTS_MODULE=" sparse" pytest ../array-api-tests/ array_api_tests/ -v -c ../array-api-tests/ pytest.ini --ci --max-examples=2 --derandomize --disable-deadline -o xfail_strict=True -n auto --xfails-file ../sparse/ci/${SPARSE_BACKEND} -array-api-xfails.txt --skips-file ../sparse/ci/${SPARSE_BACKEND} -array-api-skips.txt
9
+ ARRAY_API_TESTS_MODULE=" sparse" pytest " $ARRAY_API_TESTS_DIR / array_api_tests/" -v -c " $ARRAY_API_TESTS_DIR / pytest.ini" --ci --max-examples=2 --derandomize --disable-deadline -o xfail_strict=True -n auto --xfails-file ../sparse/ci/${SPARSE_BACKEND} -array-api-xfails.txt --skips-file ../sparse/ci/${SPARSE_BACKEND} -array-api-skips.txt
You can’t perform that action at this time.
0 commit comments