Skip to content
Merged
20 changes: 17 additions & 3 deletions .github/workflows/array-api-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,20 @@ env:

jobs:
array-api-tests:
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ['3.10', '3.13', '3.14']
numpy-version: ['1.26', 'latest', 'dev']
exclude:
- python-version: '3.10'
numpy-version: 'latest'
- python-version: '3.10'
numpy-version: 'dev'
numpy-version: 'dev'
- python-version: '3.13'
numpy-version: '1.26'
- python-version: '3.14'
Expand Down Expand Up @@ -55,9 +59,19 @@ jobs:
env:
ARRAY_API_TESTS_MODULE: array_api_strict
run: |
SKIPS_FILES="--skips-file ${GITHUB_WORKSPACE}/array-api-strict/array-api-tests-xfails.txt"
case "${{ matrix.os }}" in
macos-latest)
SKIPS_FILES="${SKIPS_FILES} --skips-file ${GITHUB_WORKSPACE}/array-api-strict/array-api-tests-macos-xfails.txt"
;;
windows-latest)
SKIPS_FILES="${SKIPS_FILES} --skips-file ${GITHUB_WORKSPACE}/array-api-strict/array-api-tests-windows-xfails.txt"
;;
esac

# Parameterizing this in the CI matrix is wasteful. Just do a loop here.
for ARRAY_API_STRICT_API_VERSION in ${API_VERSIONS}; do
export ARRAY_API_STRICT_API_VERSION
cd ${GITHUB_WORKSPACE}/array-api-tests
pytest array_api_tests/ --skips-file ${GITHUB_WORKSPACE}/array-api-strict/array-api-tests-xfails.txt ${PYTEST_ARGS}
pytest array_api_tests/ ${SKIPS_FILES} ${PYTEST_ARGS}
done
12 changes: 12 additions & 0 deletions array-api-tests-macos-xfails.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Additional failures on MacOS: all tests listed in `array-api-tests-xfails.txt` fail everywhere, plus those listed here.

# https://github.com/numpy/numpy/issues/32234
Comment thread
prady0t marked this conversation as resolved.
array_api_tests/test_special_cases.py::test_unary[atanh(real(x_i) is +0 and imag(x_i) is NaN) -> +0 + NaN j]
array_api_tests/test_special_cases.py::test_unary[tanh(real(x_i) is +0 and imag(x_i) is +infinity) -> +0 + NaN j]
array_api_tests/test_special_cases.py::test_unary[tanh(real(x_i) is +0 and imag(x_i) is NaN) -> +0 + NaN j]
array_api_tests/test_operators_and_elementwise_functions.py::test_sqrt
array_api_tests/test_special_cases.py::test_unary[atanh(real(x_i) is 1 and imag(x_i) is +0) -> +infinity + 0j]
array_api_tests/test_special_cases.py::test_unary[atanh(isfinite(real(x_i)) and real(x_i) != 0 and imag(x_i) is NaN) -> NaN + NaN j]
array_api_tests/test_special_cases.py::test_unary[atanh(real(x_i) is +infinity and imag(x_i) is NaN) -> +0 + NaN j]
array_api_tests/test_special_cases.py::test_unary[atanh(real(x_i) is NaN and imag(x_i) is +infinity) -> \xb10 + \u03c0j/2]
array_api_tests/test_special_cases.py::test_unary[atanh(real(x_i) is NaN and isfinite(imag(x_i))) -> NaN + NaN j]
10 changes: 10 additions & 0 deletions array-api-tests-windows-xfails.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Additional failures on Windows: all tests listed in `array-api-tests-xfails.txt` fail everywhere, plus those listed here.

# https://github.com/numpy/numpy/issues/32234
Comment thread
prady0t marked this conversation as resolved.
array_api_tests/test_special_cases.py::test_unary[atanh(real(x_i) is +0 and imag(x_i) is NaN) -> +0 + NaN j]
array_api_tests/test_special_cases.py::test_unary[tanh(real(x_i) is +0 and imag(x_i) is +infinity) -> +0 + NaN j]
array_api_tests/test_special_cases.py::test_unary[tanh(real(x_i) is +0 and imag(x_i) is NaN) -> +0 + NaN j]

# https://github.com/numpy/numpy/pull/24224: Fixed in NumPy 2.0
array_api_tests/test_creation_functions.py::test_arange
array_api_tests/test_creation_functions.py::test_full
Loading