Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: parametrize over Array API modules #298

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 16 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -8,7 +8,9 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11"]
python-version: ["3.11"]
array-api-module: ["array_api_strict", "array_api_compat.numpy", "array_api_compat.torch", "jax.numpy"]
fail-fast: false

steps:
- name: Checkout array-api-tests
@@ -22,11 +24,22 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install array-api-strict
if [[ ${{ matrix.array-api-module }} == *"torch"* ]]
then
python -m pip install torch --index-url https://download.pytorch.org/whl/cpu
elif [[ ${{ matrix.array-api-module }} == *"jax.numpy"* ]]
then
python -m pip install "jax[cpu]"
elif [[ ${{ matrix.array-api-module }} == *"numpy"* ]]; then
python -m pip install numpy
else
python -m pip install ${{ matrix.array-api-module }}
fi
python -m pip install -r requirements.txt
python -m pip install git+https://github.com/data-apis/array-api-compat.git
- name: Run the test suite
env:
ARRAY_API_TESTS_MODULE: array_api_strict
ARRAY_API_TESTS_MODULE: ${{ matrix.array-api-module }}
ARRAY_API_STRICT_API_VERSION: 2023.12
run: |
pytest -v -rxXfE --skips-file array-api-strict-skips.txt array_api_tests/