diff --git a/.github/workflows/check-onemath.yaml b/.github/workflows/check-onemath.yaml index bc6b8c86ccb..ab09f12ab2e 100644 --- a/.github/workflows/check-onemath.yaml +++ b/.github/workflows/check-onemath.yaml @@ -35,6 +35,9 @@ env: rerun-tests-timeout: 30 rerun-tensor-tests-timeout: 10 rerun-tensor-tests-max-attempts: 3 + # Per-test limit to kill a test stuck at 99%: https://github.com/IntelPython/dpctl/issues/1954 + # The thread method exits the process, so -n is needed for xdist to replace the worker + tensor-test-timeout: 120 jobs: build_env_file: @@ -177,7 +180,7 @@ jobs: - name: Run tensor tests if: env.rerun-tests-on-failure != 'true' run: | - python -m pytest -ra --pyargs dpnp.tests.tensor + python -m pytest -n auto -ra --timeout=${{ env.tensor-test-timeout }} --timeout-method=thread --pyargs dpnp.tests.tensor env: SYCL_CACHE_PERSISTENT: 1 @@ -212,7 +215,7 @@ jobs: . $CONDA/etc/profile.d/mamba.sh mamba activate ${{ env.test-env-name }} - python -m pytest -ra --pyargs dpnp.tests.tensor + python -m pytest -n auto -ra --timeout=${{ env.tensor-test-timeout }} --timeout-method=thread --pyargs dpnp.tests.tensor env: SYCL_CACHE_PERSISTENT: 1 @@ -315,7 +318,7 @@ jobs: - name: Run tensor tests if: env.rerun-tests-on-failure != 'true' run: | - python -m pytest -ra --pyargs dpnp.tests.tensor + python -m pytest -n auto -ra --timeout=${{ env.tensor-test-timeout }} --timeout-method=thread --pyargs dpnp.tests.tensor env: SYCL_CACHE_PERSISTENT: 1 @@ -350,6 +353,6 @@ jobs: . $CONDA/etc/profile.d/mamba.sh mamba activate ${{ env.test-env-name }} - python -m pytest -ra --pyargs dpnp.tests.tensor + python -m pytest -n auto -ra --timeout=${{ env.tensor-test-timeout }} --timeout-method=thread --pyargs dpnp.tests.tensor env: SYCL_CACHE_PERSISTENT: 1 diff --git a/environments/test.yml b/environments/test.yml index db446a7d0d1..2ae7ea6d246 100644 --- a/environments/test.yml +++ b/environments/test.yml @@ -3,4 +3,6 @@ channels: - conda-forge dependencies: - pytest + - pytest-timeout + - pytest-xdist - scipy