Skip to content

Commit 0fc9e06

Browse files
committed
Add a GitHub Actions workflow file for running the array API testsuite
1 parent 203788b commit 0fc9e06

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

.github/workflow/array-api-tests.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: NumPy Array API
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
8+
runs-on: ubuntu-latest
9+
strategy:
10+
matrix:
11+
python-version: [3.8, 3.9]
12+
13+
steps:
14+
- name: Checkout array-api-compat
15+
uses: actions/checkout@v3
16+
path: array-api-compat
17+
- name: Checkout array-api-tests
18+
uses: actions/checkout@v3
19+
repository: data-apis/array-api-tests
20+
with:
21+
submodules: 'true'
22+
path: array-api-tests
23+
- name: Set up Python ${{ matrix.python-version }}
24+
uses: actions/setup-python@v1
25+
with:
26+
python-version: ${{ matrix.python-version }}
27+
- name: Install dependencies
28+
run: |
29+
python -m pip install --upgrade pip
30+
python -m pip install numpy
31+
- name: Run the array API testsuite (NumPy)
32+
env:
33+
ARRAY_API_TESTS_MODULE: array_api_compat.numpy
34+
PYTHONPATH: "${GITHUB_WORKSPACE}/array-api-compat"
35+
run: |
36+
cd ${GITHUB_WORKSPACE}/array-api-tests
37+
pytest -v -rxXfE

0 commit comments

Comments
 (0)