Skip to content

Commit c089f78

Browse files
committed
Update workflow with the scheduled tests run
1 parent deabff7 commit c089f78

File tree

1 file changed

+17
-16
lines changed

1 file changed

+17
-16
lines changed

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

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,11 @@ on:
1212
permissions: read-all
1313

1414
env:
15-
PACKAGE_NAME: dpnp
16-
CHANNELS: '-c dppy/label/dev -c https://software.repos.intel.com/python/conda/ -c conda-forge --override-channels'
17-
TEST_ENV_NAME: test
18-
RUN_TESTS_MAX_ATTEMPTS: 2
15+
package-name: dpnp
16+
channels-list: '-c dppy/label/dev -c https://software.repos.intel.com/python/conda/ -c conda-forge --override-channels'
17+
test-env-name: test
18+
rerun-tests-max-attempts: 2
19+
rerun-tests-timeout: 20
1920

2021
jobs:
2122
test:
@@ -69,7 +70,7 @@ jobs:
6970
channels: conda-forge
7071
conda-remove-defaults: 'true'
7172
python-version: ${{ matrix.python }}
72-
activate-environment: ${{ env.TEST_ENV_NAME }}
73+
activate-environment: ${{ env.test-env-name }}
7374

7475
- name: ReSetup miniconda
7576
if: steps.setup_miniconda.outcome == 'failure'
@@ -80,18 +81,18 @@ jobs:
8081
channels: conda-forge
8182
conda-remove-defaults: 'true'
8283
python-version: ${{ matrix.python }}
83-
activate-environment: ${{ env.TEST_ENV_NAME }}
84+
activate-environment: ${{ env.test-env-name }}
8485

8586
- name: Install dpnp
8687
id: install_dpnp
8788
continue-on-error: true
8889
run: |
89-
mamba install ${{ env.PACKAGE_NAME }}=${{ steps.find_latest_tag.outputs.tag }} pytest ${{ env.CHANNELS }}
90+
mamba install ${{ env.package-name }}=${{ steps.find_latest_tag.outputs.tag }} pytest ${{ env.channels-list }}
9091
9192
- name: ReInstall dpnp
9293
if: steps.install_dpnp.outcome == 'failure'
9394
run: |
94-
mamba install ${{ env.PACKAGE_NAME }}=${{ steps.find_latest_tag.outputs.tag }} pytest ${{ env.CHANNELS }}
95+
mamba install ${{ env.package-name }}=${{ steps.find_latest_tag.outputs.tag }} pytest ${{ env.channels-list }}
9596
9697
- name: List installed packages
9798
run: mamba list
@@ -119,7 +120,7 @@ jobs:
119120
id: run_tests
120121
continue-on-error: true
121122
run: |
122-
python -m pytest -ra --pyargs ${{ env.PACKAGE_NAME }}.tests
123+
python -m pytest -ra --pyargs ${{ env.package-name }}.tests
123124
env:
124125
SYCL_CACHE_PERSISTENT: 1
125126

@@ -128,15 +129,15 @@ jobs:
128129
id: run_tests_linux
129130
uses: nick-fields/retry@7152eba30c6575329ac0576536151aca5a72780e # v3.0.0
130131
with:
131-
timeout_minutes: 15
132-
max_attempts: ${{ env.RUN_TESTS_MAX_ATTEMPTS }}
132+
timeout_minutes: ${{ env.rerun-tests-timeout }}
133+
max_attempts: ${{ env.rerun-tests-max-attempts }}
133134
retry_on: any
134135
command: |
135136
. $CONDA/etc/profile.d/conda.sh
136137
. $CONDA/etc/profile.d/mamba.sh
137-
mamba activate ${{ env.TEST_ENV_NAME }}
138+
mamba activate ${{ env.test-env-name }}
138139
139-
python -m pytest -ra --pyargs ${{ env.PACKAGE_NAME }}.tests
140+
python -m pytest -ra --pyargs ${{ env.package-name }}.tests
140141
env:
141142
SYCL_CACHE_PERSISTENT: 1
142143

@@ -145,10 +146,10 @@ jobs:
145146
id: run_tests_win
146147
uses: nick-fields/retry@7152eba30c6575329ac0576536151aca5a72780e # v3.0.0
147148
with:
148-
timeout_minutes: 17
149-
max_attempts: ${{ env.RUN_TESTS_MAX_ATTEMPTS }}
149+
timeout_minutes: ${{ env.rerun-tests-timeout }}
150+
max_attempts: ${{ env.rerun-tests-max-attempts }}
150151
retry_on: any
151152
command: |
152-
python -m pytest -ra --pyargs ${{ env.PACKAGE_NAME }}.tests
153+
python -m pytest -ra --pyargs ${{ env.package-name }}.tests
153154
env:
154155
SYCL_CACHE_PERSISTENT: 1

0 commit comments

Comments
 (0)