Skip to content

Commit fb3d2af

Browse files
committed
Rerun tests in nightly workflow based on condition
1 parent 15d2512 commit fb3d2af

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

.github/workflows/cron-run-tests.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ env:
1515
PACKAGE_NAME: dpnp
1616
CHANNELS: '-c dppy/label/dev -c https://software.repos.intel.com/python/conda/ -c conda-forge --override-channels'
1717
TEST_ENV_NAME: test
18-
RERUN_TESTS_ON_FAILURE: 'true'
1918
RUN_TESTS_MAX_ATTEMPTS: 2
2019

2120
jobs:
@@ -94,14 +93,14 @@ jobs:
9493
python -c "import dpnp; print(dpnp.__version__)"
9594
9695
- name: Run tests
97-
if: env.RERUN_TESTS_ON_FAILURE != 'true'
96+
id: run_tests
9897
run: |
9998
python -m pytest -ra --pyargs ${{ env.PACKAGE_NAME }}.tests
10099
env:
101100
SYCL_CACHE_PERSISTENT: 1
102101

103102
- name: ReRun tests on Linux
104-
if: env.RERUN_TESTS_ON_FAILURE == 'true' && matrix.runner != 'windows-2019'
103+
if: steps.run_tests.outcome == 'failure' && matrix.runner != 'windows-2019'
105104
id: run_tests_linux
106105
uses: nick-fields/retry@7152eba30c6575329ac0576536151aca5a72780e # v3.0.0
107106
with:
@@ -118,7 +117,7 @@ jobs:
118117
SYCL_CACHE_PERSISTENT: 1
119118

120119
- name: ReRun tests on Windows
121-
if: env.RERUN_TESTS_ON_FAILURE == 'true' && matrix.runner == 'windows-2019'
120+
if: steps.run_tests.outcome == 'failure' && matrix.runner == 'windows-2019'
122121
id: run_tests_win
123122
uses: nick-fields/retry@7152eba30c6575329ac0576536151aca5a72780e # v3.0.0
124123
with:

0 commit comments

Comments
 (0)