Skip to content

Commit 42931e3

Browse files
committed
Update workflow with the scheduled tests run
1 parent 056fe79 commit 42931e3

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:
@@ -67,7 +68,7 @@ jobs:
6768
channels: conda-forge
6869
conda-remove-defaults: 'true'
6970
python-version: ${{ matrix.python }}
70-
activate-environment: ${{ env.TEST_ENV_NAME }}
71+
activate-environment: ${{ env.test-env-name }}
7172

7273
- name: ReSetup miniconda
7374
if: steps.setup_miniconda.outcome == 'failure'
@@ -78,18 +79,18 @@ jobs:
7879
channels: conda-forge
7980
conda-remove-defaults: 'true'
8081
python-version: ${{ matrix.python }}
81-
activate-environment: ${{ env.TEST_ENV_NAME }}
82+
activate-environment: ${{ env.test-env-name }}
8283

8384
- name: Install dpnp
8485
id: install_dpnp
8586
continue-on-error: true
8687
run: |
87-
mamba install ${{ env.PACKAGE_NAME }}=${{ steps.find_latest_tag.outputs.tag }} pytest ${{ env.CHANNELS }}
88+
mamba install ${{ env.package-name }}=${{ steps.find_latest_tag.outputs.tag }} pytest ${{ env.channels-list }}
8889
8990
- name: ReInstall dpnp
9091
if: steps.install_dpnp.outcome == 'failure'
9192
run: |
92-
mamba install ${{ env.PACKAGE_NAME }}=${{ steps.find_latest_tag.outputs.tag }} pytest ${{ env.CHANNELS }}
93+
mamba install ${{ env.package-name }}=${{ steps.find_latest_tag.outputs.tag }} pytest ${{ env.channels-list }}
9394
9495
- name: List installed packages
9596
run: mamba list
@@ -117,7 +118,7 @@ jobs:
117118
id: run_tests
118119
continue-on-error: true
119120
run: |
120-
python -m pytest -ra --pyargs ${{ env.PACKAGE_NAME }}.tests
121+
python -m pytest -ra --pyargs ${{ env.package-name }}.tests
121122
env:
122123
SYCL_CACHE_PERSISTENT: 1
123124

@@ -126,15 +127,15 @@ jobs:
126127
id: run_tests_linux
127128
uses: nick-fields/retry@7152eba30c6575329ac0576536151aca5a72780e # v3.0.0
128129
with:
129-
timeout_minutes: 15
130-
max_attempts: ${{ env.RUN_TESTS_MAX_ATTEMPTS }}
130+
timeout_minutes: ${{ env.rerun-tests-timeout }}
131+
max_attempts: ${{ env.rerun-tests-max-attempts }}
131132
retry_on: any
132133
command: |
133134
. $CONDA/etc/profile.d/conda.sh
134135
. $CONDA/etc/profile.d/mamba.sh
135-
mamba activate ${{ env.TEST_ENV_NAME }}
136+
mamba activate ${{ env.test-env-name }}
136137
137-
python -m pytest -ra --pyargs ${{ env.PACKAGE_NAME }}.tests
138+
python -m pytest -ra --pyargs ${{ env.package-name }}.tests
138139
env:
139140
SYCL_CACHE_PERSISTENT: 1
140141

@@ -143,10 +144,10 @@ jobs:
143144
id: run_tests_win
144145
uses: nick-fields/retry@7152eba30c6575329ac0576536151aca5a72780e # v3.0.0
145146
with:
146-
timeout_minutes: 17
147-
max_attempts: ${{ env.RUN_TESTS_MAX_ATTEMPTS }}
147+
timeout_minutes: ${{ env.rerun-tests-timeout }}
148+
max_attempts: ${{ env.rerun-tests-max-attempts }}
148149
retry_on: any
149150
command: |
150-
python -m pytest -ra --pyargs ${{ env.PACKAGE_NAME }}.tests
151+
python -m pytest -ra --pyargs ${{ env.package-name }}.tests
151152
env:
152153
SYCL_CACHE_PERSISTENT: 1

0 commit comments

Comments
 (0)