Skip to content

Commit 861f454

Browse files
authored
CI: Add pytest plugins pytest-xdist and pytest-rerunfailures (#3193)
1 parent ef9f650 commit 861f454

File tree

5 files changed

+10
-4
lines changed

5 files changed

+10
-4
lines changed

.github/workflows/benchmarks.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,9 @@ jobs:
6969
pytest
7070
pytest-codspeed
7171
pytest-mpl
72-
72+
pytest-rerunfailures
73+
pytest-xdist
74+
7375
# Download cached remote files (artifacts) from GitHub
7476
- name: Download remote data from GitHub
7577
run: |

.github/workflows/ci_tests.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,8 @@ jobs:
133133
pytest-cov
134134
pytest-doctestplus
135135
pytest-mpl
136+
pytest-rerunfailures
137+
pytest-xdist
136138
137139
# Download cached remote files (artifacts) from GitHub
138140
- name: Download remote data from GitHub

.github/workflows/ci_tests_dev.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ jobs:
128128
--extra-index https://pypi.anaconda.org/scientific-python-nightly-wheels/simple \
129129
'numpy<2' pandas xarray netCDF4 packaging \
130130
build contextily dvc geopandas ipython pyarrow rioxarray \
131-
'pytest>=6.0' pytest-cov pytest-doctestplus pytest-mpl \
131+
pytest pytest-cov pytest-doctestplus pytest-mpl pytest-rerunfailures pytest-xdist\
132132
sphinx-gallery
133133
134134
# Show installed pkg information for postmortem diagnostic

environment.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,12 @@ dependencies:
2828
- ruff>=0.3.0
2929
# Dev dependencies (unit testing)
3030
- matplotlib-base
31+
- pytest>=6.0
3132
- pytest-cov
3233
- pytest-doctestplus
3334
- pytest-mpl
34-
- pytest>=6.0
35+
- pytest-rerunfailures
36+
- pytest-xdist
3537
# Dev dependencies (building documentation)
3638
- myst-parser
3739
- panel

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ max-args=10
162162

163163
[tool.pytest.ini_options]
164164
minversion = "6.0"
165-
addopts = "--verbose --durations=0 --durations-min=0.2 --doctest-modules --mpl --mpl-results-path=results"
165+
addopts = "--verbose --durations=0 --durations-min=0.2 --doctest-modules --mpl --mpl-results-path=results -n auto --reruns 2"
166166
markers = [
167167
"benchmark: mark a test with custom benchmark settings.",
168168
]

0 commit comments

Comments
 (0)