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: Remove pytest-xdist and pytest-rerunfailures options from addopts and only add them in CI jobs #3267

Merged
merged 2 commits into from
May 22, 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
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 @@ -178,7 +178,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.",
]