Skip to content

Commit 9a82cb2

Browse files
committed
Bug-fixes
1 parent 0aef791 commit 9a82cb2

File tree

4 files changed

+11
-12
lines changed

4 files changed

+11
-12
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -93,25 +93,22 @@ jobs:
9393
matrix:
9494
backend: ['Numba', 'Finch']
9595
fail-fast: false
96+
env:
97+
ARRAY_API_TESTS_DIR: ${{ github.workspace }}/array-api-tests
9698
runs-on: ubuntu-latest
9799
steps:
98100
- name: Checkout Repo
99101
uses: actions/checkout@v4
100102
- 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
107104
- name: Set up Python
108105
uses: actions/setup-python@v5
109106
with:
110107
python-version: '3.11'
111108
cache: 'pip'
112109
- name: Install build and test dependencies from PyPI
113110
run: |
114-
pip install pytest-xdist -r array-api-tests/requirements.txt
111+
pip install pytest-xdist -r "$ARRAY_API_TESTS_DIR/requirements.txt"
115112
- name: Build and install Sparse
116113
run: |
117114
pip install '.[finch]'

ci/clone_array_api_tests.sh

100644100755
Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
#!/usr/bin/env bash
22
set -euxo pipefail
33

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"
67
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")

ci/setup_env.sh

100644100755
File mode changed.

ci/test_array_api.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ source ci/clone_array_api_tests.sh
66
if [ "${SPARSE_BACKEND}" = "Finch" ]; then
77
python -c 'import finch'
88
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

0 commit comments

Comments
 (0)