File tree Expand file tree Collapse file tree 4 files changed +28
-5
lines changed Expand file tree Collapse file tree 4 files changed +28
-5
lines changed Original file line number Diff line number Diff line change
1
+ name : Array API Tests (NumPy)
2
+
3
+ on : [push, pull_request]
4
+
5
+ jobs :
6
+ call-workflow-passing-data :
7
+ uses : ./github/workflows/array-api-tests.yml
8
+ with :
9
+ package-name : numpy
Original file line number Diff line number Diff line change
1
+ name : Array API Tests (PyTorch)
2
+
3
+ on : [push, pull_request]
4
+
5
+ jobs :
6
+ call-workflow-passing-data :
7
+ uses : ./github/workflows/array-api-tests.yml
8
+ with :
9
+ package-name : torch
Original file line number Diff line number Diff line change 1
1
name : Array API Tests
2
2
3
- on : [push, pull_request]
3
+ on :
4
+ workflow_call :
5
+ inputs :
6
+ package-name :
7
+ required : true
8
+ type : string
4
9
5
10
env :
6
11
PYTEST_ARGS : " --max-examples 200 -v -rxXfE --ci"
@@ -34,15 +39,15 @@ jobs:
34
39
- name : Install dependencies
35
40
run : |
36
41
python -m pip install --upgrade pip
37
- python -m pip install numpy
42
+ python -m pip install {{ inputs.package-name }}
38
43
python -m pip install -r ${GITHUB_WORKSPACE}/array-api-tests/requirements.txt
39
- - name : Run the array API testsuite (NumPy )
44
+ - name : Run the array API testsuite ({{ inputs.package-name }} )
40
45
env :
41
- ARRAY_API_TESTS_MODULE : array_api_compat.numpy
46
+ ARRAY_API_TESTS_MODULE : array_api_compat.{{ inputs.package-name }}
42
47
# This enables the NEP 50 type promotion behavior (without it a lot of
43
48
# tests fail on bad scalar type promotion behavior)
44
49
NPY_PROMOTION_STATE : weak
45
50
run : |
46
51
export PYTHONPATH="${GITHUB_WORKSPACE}/array-api-compat"
47
52
cd ${GITHUB_WORKSPACE}/array-api-tests
48
- pytest ${PYTEST_ARGS} --xfails-file ${GITHUB_WORKSPACE}/array-api-compat/numpy -xfails.txt array_api_tests/
53
+ pytest ${PYTEST_ARGS} --xfails-file ${GITHUB_WORKSPACE}/array-api-compat/{{ inputs.package-name }} -xfails.txt array_api_tests/
File renamed without changes.
You can’t perform that action at this time.
0 commit comments