Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: Add pytest plugins pytest-xdist and pytest-rerunfailures #3193

Merged
merged 19 commits into from
May 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/ci_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_tests_dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
]
Loading