diff --git a/.github/workflows/check-onemath.yaml b/.github/workflows/check-onemath.yaml index 544367ae819..07bc46f6a18 100644 --- a/.github/workflows/check-onemath.yaml +++ b/.github/workflows/check-onemath.yaml @@ -27,6 +27,8 @@ env: test-pkg-env: 'environments/test.yml' test-env-name: 'test_onemath' rerun-tests-on-failure: 'true' + # A retry reruns only the failed tests (--lf), or all of them after a timeout kill + # Serial runs also need --continue-on-collection-errors, or a collection error skips all other tests rerun-tests-max-attempts: 2 rerun-tests-timeout: 30 rerun-tensor-tests-timeout: 10 @@ -188,7 +190,7 @@ jobs: . $CONDA/etc/profile.d/mamba.sh mamba activate ${{ env.test-env-name }} - python -m pytest -ra --pyargs dpnp.tests + python -m pytest -ra --lf --continue-on-collection-errors --pyargs dpnp.tests env: SKIP_TENSOR_TESTS: 1 SYCL_CACHE_PERSISTENT: 1 @@ -206,7 +208,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 -ra --lf --continue-on-collection-errors --pyargs dpnp.tests.tensor env: SYCL_CACHE_PERSISTENT: 1 @@ -324,7 +326,7 @@ jobs: . $CONDA/etc/profile.d/mamba.sh mamba activate ${{ env.test-env-name }} - python -m pytest -ra --pyargs dpnp.tests + python -m pytest -ra --lf --continue-on-collection-errors --pyargs dpnp.tests env: SKIP_TENSOR_TESTS: 1 SYCL_CACHE_PERSISTENT: 1 @@ -342,6 +344,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 -ra --lf --continue-on-collection-errors --pyargs dpnp.tests.tensor env: SYCL_CACHE_PERSISTENT: 1 diff --git a/.github/workflows/conda-build-test.yml b/.github/workflows/conda-build-test.yml index 77a934a1598..93a2029da29 100644 --- a/.github/workflows/conda-build-test.yml +++ b/.github/workflows/conda-build-test.yml @@ -33,6 +33,8 @@ env: fetch-depth: 1 python-ver-test-all-dtypes: '3.14' test-env-name: 'test' + # A retry reruns only the failed tests (--lf), or all of them after a timeout kill + # Serial runs also need --continue-on-collection-errors, or a collection error skips all other tests rerun-tests-max-attempts: 2 rerun-tests-timeout: 45 rerun-tensor-tests-timeout: 15 @@ -282,9 +284,9 @@ jobs: if [[ "${{ env.python-label }}" == "${{ env.python-ver-test-all-dtypes }}" ]]; then export DPNP_TEST_ALL_INT_TYPES=1 - python -m pytest -ra --pyargs ${{ env.module-name }}.tests + python -m pytest -ra --lf --continue-on-collection-errors --pyargs ${{ env.module-name }}.tests else - python -m pytest -n auto -ra --pyargs ${{ env.module-name }}.tests + python -m pytest -n auto -ra --lf --pyargs ${{ env.module-name }}.tests fi - name: Run tensor tests @@ -300,4 +302,4 @@ jobs: . "$CONDA_UNIX/etc/profile.d/conda.sh" conda activate ${{ env.test-env-name }} - python -m pytest -n auto -ra --timeout=${{ env.tensor-test-timeout }} --timeout-method=thread --pyargs dpnp.tests.tensor + python -m pytest -n auto -ra --lf --timeout=${{ env.tensor-test-timeout }} --timeout-method=thread --pyargs dpnp.tests.tensor diff --git a/.github/workflows/conda-package.yml b/.github/workflows/conda-package.yml index 4fc22b5b467..ebdf5c066cc 100644 --- a/.github/workflows/conda-package.yml +++ b/.github/workflows/conda-package.yml @@ -27,6 +27,8 @@ env: python-ver-test-all-dtypes: '3.14' test-env-name: 'test' rerun-tests-on-failure: 'true' + # A retry reruns only the failed tests (--lf), or all of them after a timeout kill + # Serial runs also need --continue-on-collection-errors, or a collection error skips all other tests rerun-tests-max-attempts: 2 rerun-tests-timeout: 45 rerun-tensor-tests-timeout: 15 @@ -295,9 +297,9 @@ jobs: if [[ "${{ env.python-label }}" == "${{ env.python-ver-test-all-dtypes }}" ]]; then export DPNP_TEST_ALL_INT_TYPES=1 - python -m pytest -ra --pyargs ${{ env.package-name }}.tests + python -m pytest -ra --lf --continue-on-collection-errors --pyargs ${{ env.package-name }}.tests else - python -m pytest -n auto -ra --pyargs ${{ env.package-name }}.tests + python -m pytest -n auto -ra --lf --pyargs ${{ env.package-name }}.tests fi - name: Run tensor tests @@ -318,7 +320,7 @@ jobs: . $CONDA/etc/profile.d/mamba.sh mamba activate ${{ env.test-env-name }} - python -m pytest -n auto -ra --timeout=${{ env.tensor-test-timeout }} --timeout-method=thread --pyargs dpnp.tests.tensor + python -m pytest -n auto -ra --lf --timeout=${{ env.tensor-test-timeout }} --timeout-method=thread --pyargs dpnp.tests.tensor test_examples_linux: name: Test examples @@ -603,9 +605,9 @@ jobs: $env:SKIP_TENSOR_TESTS=1 if ( "${{ env.python-label }}" -eq "${{ env.python-ver-test-all-dtypes }}" ) { $env:DPNP_TEST_ALL_INT_TYPES=1 - python -m pytest -ra --pyargs ${{ env.package-name }}.tests + python -m pytest -ra --lf --continue-on-collection-errors --pyargs ${{ env.package-name }}.tests } else { - python -m pytest -n auto -ra --pyargs ${{ env.package-name }}.tests + python -m pytest -n auto -ra --lf --pyargs ${{ env.package-name }}.tests } - name: Run tensor tests @@ -624,7 +626,7 @@ jobs: retry_on: any shell: pwsh command: | - python -m pytest -n auto -ra --timeout=${{ env.tensor-test-timeout }} --timeout-method=thread --pyargs dpnp.tests.tensor + python -m pytest -n auto -ra --lf --timeout=${{ env.tensor-test-timeout }} --timeout-method=thread --pyargs dpnp.tests.tensor upload: name: Upload diff --git a/.github/workflows/cron-run-tests.yaml b/.github/workflows/cron-run-tests.yaml index b832ebbec61..b3593bfb176 100644 --- a/.github/workflows/cron-run-tests.yaml +++ b/.github/workflows/cron-run-tests.yaml @@ -16,6 +16,8 @@ env: channels-list: '-c dppy/label/dev -c https://software.repos.intel.com/python/conda/ -c conda-forge --override-channels' test-env-name: test test-packages: 'pytest scipy' + # A retry reruns only the failed tests (--lf), or all of them after a timeout kill + # Serial runs also need --continue-on-collection-errors, or a collection error skips all other tests rerun-tests-max-attempts: 2 rerun-tests-timeout: 20 @@ -138,7 +140,7 @@ jobs: id: run_tests continue-on-error: true run: | - python -m pytest -ra --pyargs ${{ env.package-name }}.tests + python -m pytest -ra --continue-on-collection-errors --pyargs ${{ env.package-name }}.tests env: SYCL_CACHE_PERSISTENT: 1 @@ -155,7 +157,7 @@ jobs: . $CONDA/etc/profile.d/mamba.sh mamba activate ${{ env.test-env-name }} - python -m pytest -ra --pyargs ${{ env.package-name }}.tests + python -m pytest -ra --lf --continue-on-collection-errors --pyargs ${{ env.package-name }}.tests env: SYCL_CACHE_PERSISTENT: 1 @@ -168,6 +170,6 @@ jobs: max_attempts: ${{ env.rerun-tests-max-attempts }} retry_on: any command: | - python -m pytest -ra --pyargs ${{ env.package-name }}.tests + python -m pytest -ra --lf --continue-on-collection-errors --pyargs ${{ env.package-name }}.tests env: SYCL_CACHE_PERSISTENT: 1