Skip to content

Commit

Permalink
CI: Remove pytest-xdist and pytest-rerunfailures options from addopts…
Browse files Browse the repository at this point in the history
… and only add them in CI jobs (#3267)
  • Loading branch information
seisman authored May 22, 2024
1 parent 5396e1e commit 7bd57d5
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 8 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ jobs:
pytest
pytest-codspeed
pytest-mpl
pytest-rerunfailures
pytest-rerunfailures
pytest-xdist
# Download cached remote files (artifacts) from GitHub
- name: Download remote data from GitHub
run: |
Expand All @@ -93,4 +93,4 @@ jobs:
with:
# 'bash -el -c' is needed to use the custom shell.
# See https://github.com/CodSpeedHQ/action/issues/65.
run: bash -el -c "python -c \"import pygmt; pygmt.show_versions()\"; PYGMT_USE_EXTERNAL_DISPLAY=false python -m pytest -r P --pyargs pygmt --codspeed"
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"
2 changes: 1 addition & 1 deletion .github/workflows/ci_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ jobs:

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

# Upload diff images on test failure
- name: Upload diff images if any test fails
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 @@ -173,7 +173,7 @@ jobs:

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

Expand Down
2 changes: 0 additions & 2 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ dependencies:
- pytest-cov
- pytest-doctestplus
- pytest-mpl
- 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 -n auto --reruns 2"
addopts = "--verbose --durations=0 --durations-min=0.2 --doctest-modules --mpl --mpl-results-path=results"
markers = [
"benchmark: mark a test with custom benchmark settings.",
]

0 comments on commit 7bd57d5

Please sign in to comment.