Skip to content

Commit 6b6b487

Browse files
committed
Use package-version as an input instead
GitHub Actions expressions are very limited in what you can do with them. The default cannot reference another variable, and there is no way to do manipulation or "if" clauses with them.
1 parent 642bbd1 commit 6b6b487

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

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

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,13 @@ on:
66
package-name:
77
required: true
88
type: string
9-
pytest-extra-args:
10-
required: false
11-
type: string
12-
xfails-file:
9+
package-version:
1310
required: false
1411
type: string
15-
default: '${{ inputs.package-name }}-xfails.txt'
16-
skips-file:
12+
default: '>= 0'
13+
pytest-extra-args:
1714
required: false
1815
type: string
19-
default: '${{ inputs.package-name }}-skips.txt'
2016

2117
env:
2218
PYTEST_ARGS: "--max-examples 200 -v -rxXfE --ci ${{ inputs.pytest-extra-args }}"
@@ -50,7 +46,7 @@ jobs:
5046
- name: Install dependencies
5147
run: |
5248
python -m pip install --upgrade pip
53-
python -m pip install ${{ inputs.package-name }}
49+
python -m pip install '${{ inputs.package-name }} ${{ inputs.package-version }}'
5450
python -m pip install -r ${GITHUB_WORKSPACE}/array-api-tests/requirements.txt
5551
- name: Run the array API testsuite (${{ inputs.package-name }})
5652
env:
@@ -61,4 +57,4 @@ jobs:
6157
run: |
6258
export PYTHONPATH="${GITHUB_WORKSPACE}/array-api-compat"
6359
cd ${GITHUB_WORKSPACE}/array-api-tests
64-
pytest ${PYTEST_ARGS} --xfails-file ${GITHUB_WORKSPACE}/array-api-compat/${{ inputs.xfails-file }} --skips-file ${GITHUB_WORKSPACE}/array-api-compat/${{ inputs.skips-file }} array_api_tests/
60+
pytest --xfails-file ${GITHUB_WORKSPACE}/array-api-compat/${{ inputs.package-name }}-xfails.txt --skips-file ${GITHUB_WORKSPACE}/array-api-compat/${{ inputs.package-name }}-skips.txt ${PYTEST_ARGS} array_api_tests/

0 commit comments

Comments
 (0)