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

Running pytests in parallel #363

Draft
wants to merge 3 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,11 @@ jobs:
test:
name: Test on ${{ matrix.os }}, Python ${{ matrix.python-version }}
runs-on: "${{ matrix.os }}"
continue-on-error: ${{ matrix.continue_bool }}
strategy:
matrix:
os: ["ubuntu-latest", "macos-latest"]
continue_bool: [True]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]

steps:
Expand Down Expand Up @@ -73,7 +75,7 @@ jobs:
# conda setup requires this special shell
shell: bash -l {0}
run: |
pytest -v --cov=westpa --cov-report=xml --color=yes tests
pytest -n 2 -v --cov=westpa --cov-report=xml --color=yes tests

- name: CodeCov
uses: codecov/codecov-action@v3
Expand Down
1 change: 1 addition & 0 deletions devtools/conda-envs/test_env.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ dependencies:
- pytest-cov
- pytest-rerunfailures
- pytest-timeout
- pytest-xdist
- codecov
- pip
- pip:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def extensions():
]

EXTRAS_REQUIRE = {
"tests": ["pytest", "pytest-cov", "pytest-rerunfailures", "pytest-timeout"],
"tests": ["pytest", "pytest-cov", "pytest-rerunfailures", "pytest-timeout", "pytest-xdist"],
"mpi": ["mpi4py"],
}

Expand Down