diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a58f1841..806dd395 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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/