Skip to content

Commit 574f69a

Browse files
committed
address comment
1 parent 8236bed commit 574f69a

File tree

1 file changed

+28
-52
lines changed

1 file changed

+28
-52
lines changed

.github/workflows/conda-package.yml

Lines changed: 28 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -210,38 +210,19 @@ jobs:
210210
python -c "import dpnp; print(dpnp.__version__)"
211211
212212
- name: Run tests
213-
if: env.RERUN_TESTS_ON_FAILURE != 'true' && matrix.python != env.LATEST_PYTHON
213+
if: env.RERUN_TESTS_ON_FAILURE != 'true'
214214
run: |
215-
python -m pytest -n auto -ra --pyargs ${{ env.PACKAGE_NAME }}.tests
216-
217-
- name: Run tests for all dtypes
218-
if: env.RERUN_TESTS_ON_FAILURE != 'true' && matrix.python == env.LATEST_PYTHON
219-
env:
220-
DPNP_TEST_ALL_INT_TYPES: 1
221-
run: |
222-
python -m pytest -ra --pyargs ${{ env.PACKAGE_NAME }}.tests
215+
if [[ ${{ matrix.python }} == ${{ env.LATEST_PYTHON }} ]]; then
216+
export DPNP_TEST_ALL_INT_TYPES=1
217+
python -m pytest -ra --pyargs ${{ env.PACKAGE_NAME }}.tests
218+
else
219+
python -m pytest -n auto -ra --pyargs ${{ env.PACKAGE_NAME }}.tests
220+
fi
223221
224222
- name: Run tests
225-
if: env.RERUN_TESTS_ON_FAILURE == 'true' && matrix.python != env.LATEST_PYTHON
223+
if: env.RERUN_TESTS_ON_FAILURE == 'true'
226224
id: run_tests_linux
227225
uses: nick-fields/retry@7152eba30c6575329ac0576536151aca5a72780e # v3.0.0
228-
with:
229-
timeout_minutes: 15
230-
max_attempts: ${{ env.RUN_TESTS_MAX_ATTEMPTS }}
231-
retry_on: any
232-
command: |
233-
. $CONDA/etc/profile.d/conda.sh
234-
. $CONDA/etc/profile.d/mamba.sh
235-
mamba activate ${{ env.TEST_ENV_NAME }}
236-
237-
python -m pytest -n auto -ra --pyargs ${{ env.PACKAGE_NAME }}.tests
238-
239-
- name: Run tests for all dtypes
240-
if: env.RERUN_TESTS_ON_FAILURE == 'true' && matrix.python == env.LATEST_PYTHON
241-
id: run_tests_linux_all_dtypes
242-
uses: nick-fields/retry@7152eba30c6575329ac0576536151aca5a72780e # v3.0.0
243-
env:
244-
DPNP_TEST_ALL_INT_TYPES: 1
245226
with:
246227
timeout_minutes: 25
247228
max_attempts: ${{ env.RUN_TESTS_MAX_ATTEMPTS }}
@@ -251,7 +232,12 @@ jobs:
251232
. $CONDA/etc/profile.d/mamba.sh
252233
mamba activate ${{ env.TEST_ENV_NAME }}
253234
254-
python -m pytest -ra --pyargs ${{ env.PACKAGE_NAME }}.tests
235+
if [[ ${{ matrix.python }} == ${{ env.LATEST_PYTHON }} ]]; then
236+
export DPNP_TEST_ALL_INT_TYPES=1
237+
python -m pytest -ra --pyargs ${{ env.PACKAGE_NAME }}.tests
238+
else
239+
python -m pytest -n auto -ra --pyargs ${{ env.PACKAGE_NAME }}.tests
240+
fi
255241
256242
test_windows:
257243
name: Test
@@ -371,40 +357,30 @@ jobs:
371357
python -c "import dpnp; print(dpnp.__version__)"
372358
373359
- name: Run tests
374-
if: env.RERUN_TESTS_ON_FAILURE != 'true' && matrix.python != env.LATEST_PYTHON
375-
run: |
376-
python -m pytest -n auto -ra --pyargs ${{ env.PACKAGE_NAME }}.tests
377-
378-
- name: Run tests for all dtypes
379-
if: env.RERUN_TESTS_ON_FAILURE != 'true' && matrix.python == env.LATEST_PYTHON
380-
env:
381-
DPNP_TEST_ALL_INT_TYPES: 1
360+
if: env.RERUN_TESTS_ON_FAILURE != 'true'
382361
run: |
383-
python -m pytest -ra --pyargs ${{ env.PACKAGE_NAME }}.tests
362+
if (${{ matrix.python }} == ${{ env.LATEST_PYTHON }}) {
363+
set DPNP_TEST_ALL_INT_TYPES=1
364+
python -m pytest -ra --pyargs ${{ env.PACKAGE_NAME }}.tests
365+
} else {
366+
python -m pytest -n auto -ra --pyargs ${{ env.PACKAGE_NAME }}.tests
367+
}
384368
385369
- name: Run tests
386-
if: env.RERUN_TESTS_ON_FAILURE == 'true' && matrix.python != env.LATEST_PYTHON
370+
if: env.RERUN_TESTS_ON_FAILURE == 'true'
387371
id: run_tests_win
388372
uses: nick-fields/retry@7152eba30c6575329ac0576536151aca5a72780e # v3.0.0
389-
with:
390-
timeout_minutes: 17
391-
max_attempts: ${{ env.RUN_TESTS_MAX_ATTEMPTS }}
392-
retry_on: any
393-
command: |
394-
python -m pytest -n auto -ra --pyargs ${{ env.PACKAGE_NAME }}.tests
395-
396-
- name: Run tests for all dtypes
397-
if: env.RERUN_TESTS_ON_FAILURE == 'true' && matrix.python == env.LATEST_PYTHON
398-
id: run_tests_win_all_dtypes
399-
uses: nick-fields/retry@7152eba30c6575329ac0576536151aca5a72780e # v3.0.0
400-
env:
401-
DPNP_TEST_ALL_INT_TYPES: 1
402373
with:
403374
timeout_minutes: 35
404375
max_attempts: ${{ env.RUN_TESTS_MAX_ATTEMPTS }}
405376
retry_on: any
406377
command: |
407-
python -m pytest -ra --pyargs ${{ env.PACKAGE_NAME }}.tests
378+
if ( ${{ matrix.python }} == ${{ env.LATEST_PYTHON }} ) {
379+
set DPNP_TEST_ALL_INT_TYPES=1
380+
python -m pytest -ra --pyargs ${{ env.PACKAGE_NAME }}.tests
381+
} else {
382+
python -m pytest -n auto -ra --pyargs ${{ env.PACKAGE_NAME }}.tests
383+
}
408384
409385
upload:
410386
name: Upload

0 commit comments

Comments
 (0)