Skip to content

Commit 7bd57d5

Browse files
authored
CI: Remove pytest-xdist and pytest-rerunfailures options from addopts and only add them in CI jobs (#3267)
1 parent 5396e1e commit 7bd57d5

File tree

5 files changed

+6
-8
lines changed

5 files changed

+6
-8
lines changed

.github/workflows/benchmarks.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,9 @@ jobs:
6969
pytest
7070
pytest-codspeed
7171
pytest-mpl
72-
pytest-rerunfailures
72+
pytest-rerunfailures
7373
pytest-xdist
74-
74+
7575
# Download cached remote files (artifacts) from GitHub
7676
- name: Download remote data from GitHub
7777
run: |
@@ -93,4 +93,4 @@ jobs:
9393
with:
9494
# 'bash -el -c' is needed to use the custom shell.
9595
# See https://github.com/CodSpeedHQ/action/issues/65.
96-
run: bash -el -c "python -c \"import pygmt; pygmt.show_versions()\"; PYGMT_USE_EXTERNAL_DISPLAY=false python -m pytest -r P --pyargs pygmt --codspeed"
96+
run: bash -el -c "python -c \"import pygmt; pygmt.show_versions()\"; PYGMT_USE_EXTERNAL_DISPLAY=false python -m pytest -r P -n auto --reruns 2 --pyargs pygmt --codspeed"

.github/workflows/ci_tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ jobs:
157157

158158
# Run the regular tests
159159
- name: Run tests
160-
run: make test PYTEST_EXTRA="-r P"
160+
run: make test PYTEST_EXTRA="-r P -n auto --reruns 2"
161161

162162
# Upload diff images on test failure
163163
- name: Upload diff images if any test fails

.github/workflows/ci_tests_dev.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ jobs:
173173

174174
# Run the tests
175175
- name: Test with pytest
176-
run: make test PYTEST_EXTRA="-r P"
176+
run: make test PYTEST_EXTRA="-r P -n auto --reruns 2"
177177
env:
178178
GMT_LIBRARY_PATH: ${{ runner.temp }}/gmt-install-dir/lib
179179

environment.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@ dependencies:
3232
- pytest-cov
3333
- pytest-doctestplus
3434
- pytest-mpl
35-
- pytest-rerunfailures
36-
- pytest-xdist
3735
# Dev dependencies (building documentation)
3836
- myst-parser
3937
- 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 -n auto --reruns 2"
165+
addopts = "--verbose --durations=0 --durations-min=0.2 --doctest-modules --mpl --mpl-results-path=results"
166166
markers = [
167167
"benchmark: mark a test with custom benchmark settings.",
168168
]

0 commit comments

Comments
 (0)