Skip to content

Commit

Permalink
Use pytest-xdist and 2 workers on CI when running the test suite
Browse files Browse the repository at this point in the history
  • Loading branch information
ericpre committed Oct 29, 2023
1 parent 4094f3f commit 807d7de
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
- name: Run test suite
run: |
pytest --pyargs exspy
pytest --pyargs exspy -n 2
- name: Upload coverage to Codecov
if: ${{ always() }}
Expand Down
6 changes: 5 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,8 @@
force-exclude = '''
exspy/misc/eds/ffast_mac.py
| exspy/misc/elements.py
'''
'''

[tool.pytest.ini_options]
addopts = "-ra -n auto --dist loadfile"
testpaths = ["hyperspy/tests", ]
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
"pytest >= 5.0",
"pytest-mpl",
"pytest-cov >= 2.8.1",
"pytest-xdist",
],
"dev": ["black", "pre-commit >=1.16"],
}
Expand Down

0 comments on commit 807d7de

Please sign in to comment.