Skip to content

Commit 4ebee8d

Browse files
committed
address comment
1 parent 218c9c0 commit 4ebee8d

File tree

1 file changed

+25
-49
lines changed

1 file changed

+25
-49
lines changed

.github/workflows/conda-package.yml

Lines changed: 25 additions & 49 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
225223
if: env.RERUN_TESTS_ON_FAILURE == 'true' && matrix.python != env.LATEST_PYTHON
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
@@ -373,38 +359,28 @@ jobs:
373359
- name: Run tests
374360
if: env.RERUN_TESTS_ON_FAILURE != 'true' && matrix.python != env.LATEST_PYTHON
375361
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
382-
run: |
383-
python -m pytest -ra --pyargs ${{ env.PACKAGE_NAME }}.tests
362+
if [[ ${{ matrix.python }} == ${{ env.LATEST_PYTHON }} ]]; then
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+
fi
384368
385369
- name: Run tests
386370
if: env.RERUN_TESTS_ON_FAILURE == 'true' && matrix.python != env.LATEST_PYTHON
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 }} ]]; then
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+
fi
408384
409385
upload:
410386
name: Upload

0 commit comments

Comments
 (0)