Skip to content

Commit 81d22e6

Browse files
committed
Make tests rerun conditional
1 parent f962698 commit 81d22e6

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

.github/workflows/conda-package.yml

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ env:
1616
CHANNELS: '-c dppy/label/dev -c https://software.repos.intel.com/python/conda/ -c conda-forge --override-channels'
1717
CONDA_BUILD_VERSION: '24.5.1'
1818
CONDA_INDEX_VERSION: '0.5.0'
19+
RERUN_TESTS_ON_FAILURE: 'false'
1920
RUN_TESTS_MAX_ATTEMPTS: 2
2021
TEST_ENV_NAME: 'test'
2122
TEST_SCOPE: >-
@@ -255,14 +256,14 @@ jobs:
255256
python -c "import dpnp, dpctl; dpctl.lsplatform()"
256257
python -c "import dpnp; print(dpnp.__version__)"
257258
258-
# TODO: run the whole scope once the issues on CPU are resolved
259-
# - name: Run tests
260-
# run: |
261-
# python -m pytest -q -ra --disable-warnings -vv ${{ env.TEST_SCOPE }}
262-
# working-directory: ${{ env.tests-path }}
259+
- name: Run tests
260+
if: env.RERUN_TESTS_ON_FAILURE != 'true'
261+
run: |
262+
python -m pytest -q -ra --disable-warnings -vv ${{ env.TEST_SCOPE }}
263+
working-directory: ${{ env.tests-path }}
263264

264-
# TODO: remove once 2024.2 release is published
265265
- name: Run tests
266+
if: env.RERUN_TESTS_ON_FAILURE == 'true'
266267
id: run_tests_linux
267268
uses: nick-fields/retry@7152eba30c6575329ac0576536151aca5a72780e # v3.0.0
268269
with:
@@ -411,14 +412,14 @@ jobs:
411412
python -c "import dpnp, dpctl; dpctl.lsplatform()"
412413
python -c "import dpnp; print(dpnp.__version__)"
413414
414-
# TODO: run the whole scope once the issues on CPU are resolved
415-
# - name: Run tests
416-
# run: |
417-
# python -m pytest -q -ra --disable-warnings -vv ${{ env.TEST_SCOPE }}
418-
# working-directory: ${{ env.tests-path }}
415+
- name: Run tests
416+
if: env.RERUN_TESTS_ON_FAILURE != 'true'
417+
run: |
418+
python -m pytest -q -ra --disable-warnings -vv ${{ env.TEST_SCOPE }}
419+
working-directory: ${{ env.tests-path }}
419420

420-
# TODO: remove once 2024.2 release is published
421421
- name: Run tests
422+
if: env.RERUN_TESTS_ON_FAILURE == 'true'
422423
id: run_tests_win
423424
uses: nick-fields/retry@7152eba30c6575329ac0576536151aca5a72780e # v3.0.0
424425
with:

0 commit comments

Comments
 (0)