FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
array-api-compat/.github/workflows/array-api-tests.yml at main · data-apis/array-api-compat · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
data-apis
/
array-api-compat
Public
Notifications
You must be signed in to change notification settings
Fork
48
Star
130
Code
Issues
39
Pull requests
13
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
array-api-compat
/
.github
/
workflows
/
array-api-tests.yml
Copy path
View runs
More file actions
More file actions
Latest commit
History
History
History
97 lines (86 loc) · 3.2 KB
Breadcrumbs
array-api-compat
/
.github
/
workflows
/
array-api-tests.yml
Copy path
File metadata and controls
97 lines (86 loc) · 3.2 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
name
:
Array API Tests
on
:
workflow_call
:
inputs
:
package-name
:
required
:
true
type
:
string
module-name
:
required
:
false
type
:
string
extra-requires
:
required
:
false
type
:
string
package-version
:
required
:
false
type
:
string
default
:
'
>= 0
'
python-versions
:
required
:
true
type
:
string
description
:
JSON array of Python versions to test against.
pytest-extra-args
:
required
:
false
type
:
string
#
This is not how I would prefer to implement this but it's the only way
#
that seems possible with GitHub Actions' limited expressions syntax
xfails-file-extra
:
required
:
false
type
:
string
skips-file-extra
:
required
:
false
type
:
string
extra-env-vars
:
required
:
false
type
:
string
description
:
Multiline string of environment variables to set for the test run.
env
:
PYTEST_ARGS
:
"
--max-examples 1000 -v -rxXfE ${{ inputs.pytest-extra-args }} --hypothesis-disable-deadline --durations 20
"
jobs
:
tests
:
runs-on
:
ubuntu-latest
strategy
:
fail-fast
:
false
matrix
:
python-version
:
${{ fromJson(inputs.python-versions) }}
steps
:
-
name
:
Checkout array-api-compat
uses
:
actions/checkout@v7.0.1
with
:
path
:
array-api-compat
-
name
:
Checkout array-api-tests
uses
:
actions/checkout@v7.0.1
with
:
repository
:
data-apis/array-api-tests
submodules
:
'
true
'
path
:
array-api-tests
-
name
:
Set up Python ${{ matrix.python-version }}
uses
:
actions/setup-python@v7.0.0
with
:
python-version
:
${{ matrix.python-version }}
-
name
:
Set Extra Environment Variables
#
Set additional environment variables if provided
if
:
inputs.extra-env-vars
run
:
|
echo "${{ inputs.extra-env-vars }}" >> $GITHUB_ENV
-
name
:
Install dependencies
run
:
|
python -m pip install --upgrade pip
python -m pip install '${{ inputs.package-name }} ${{ inputs.package-version }}' ${{ inputs.extra-requires }}
python -m pip install -r ${GITHUB_WORKSPACE}/array-api-tests/requirements.txt
python -m pip install pytest-xdist
-
name
:
Install array-api-compat
run
:
python -m pip install ${GITHUB_WORKSPACE}/array-api-compat
-
name
:
Dump pip environment
run
:
pip freeze
-
name
:
Run the array API testsuite (${{ inputs.package-name }})
env
:
ARRAY_API_TESTS_MODULE
:
array_api_compat.${{ inputs.module-name || inputs.package-name }}
ARRAY_API_TESTS_VERSION
:
2025.12
#
This enables the NEP 50 type promotion behavior (without it a lot of
#
tests fail on bad scalar type promotion behavior)
NPY_PROMOTION_STATE
:
weak
run
:
|
export PYTHONPATH="${GITHUB_WORKSPACE}/array-api-compat"
cd ${GITHUB_WORKSPACE}/array-api-tests
pytest array_api_tests/ --xfails-file ${GITHUB_WORKSPACE}/array-api-compat/${{ inputs.package-name }}${{ inputs.xfails-file-extra }}-xfails.txt --skips-file ${GITHUB_WORKSPACE}/array-api-compat/${{ inputs.package-name }}${{ inputs.skips-file-extra}}-skips.txt ${PYTEST_ARGS}
Back
|
FazBrowse Home
|
New Git URL