diff --git a/.github/workflows/benchmarks.yml b/.github/workflows/benchmarks.yml index 9d223f6f7cd..93fc26fbc8c 100644 --- a/.github/workflows/benchmarks.yml +++ b/.github/workflows/benchmarks.yml @@ -69,7 +69,9 @@ jobs: pytest pytest-codspeed pytest-mpl - + pytest-rerunfailures + pytest-xdist + # Download cached remote files (artifacts) from GitHub - name: Download remote data from GitHub run: | diff --git a/.github/workflows/ci_tests.yaml b/.github/workflows/ci_tests.yaml index c0b2d79f606..42046dcbd39 100644 --- a/.github/workflows/ci_tests.yaml +++ b/.github/workflows/ci_tests.yaml @@ -133,6 +133,8 @@ jobs: pytest-cov pytest-doctestplus pytest-mpl + pytest-rerunfailures + pytest-xdist # Download cached remote files (artifacts) from GitHub - name: Download remote data from GitHub diff --git a/.github/workflows/ci_tests_dev.yaml b/.github/workflows/ci_tests_dev.yaml index f7505109348..2c32e26238e 100644 --- a/.github/workflows/ci_tests_dev.yaml +++ b/.github/workflows/ci_tests_dev.yaml @@ -128,7 +128,7 @@ jobs: --extra-index https://pypi.anaconda.org/scientific-python-nightly-wheels/simple \ 'numpy<2' pandas xarray netCDF4 packaging \ build contextily dvc geopandas ipython pyarrow rioxarray \ - 'pytest>=6.0' pytest-cov pytest-doctestplus pytest-mpl \ + pytest pytest-cov pytest-doctestplus pytest-mpl pytest-rerunfailures pytest-xdist\ sphinx-gallery # Show installed pkg information for postmortem diagnostic diff --git a/environment.yml b/environment.yml index 6791196c1e7..ad92914bda9 100644 --- a/environment.yml +++ b/environment.yml @@ -28,10 +28,12 @@ dependencies: - ruff>=0.3.0 # Dev dependencies (unit testing) - matplotlib-base + - pytest>=6.0 - pytest-cov - pytest-doctestplus - pytest-mpl - - pytest>=6.0 + - pytest-rerunfailures + - pytest-xdist # Dev dependencies (building documentation) - myst-parser - panel diff --git a/pyproject.toml b/pyproject.toml index 773bf07f5e6..aa09cd11e92 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -162,7 +162,7 @@ max-args=10 [tool.pytest.ini_options] minversion = "6.0" -addopts = "--verbose --durations=0 --durations-min=0.2 --doctest-modules --mpl --mpl-results-path=results" +addopts = "--verbose --durations=0 --durations-min=0.2 --doctest-modules --mpl --mpl-results-path=results -n auto --reruns 2" markers = [ "benchmark: mark a test with custom benchmark settings.", ]