Skip to content

Commit

Permalink
Run tests in parallel with pytest-xdist (#13287)
Browse files Browse the repository at this point in the history
  • Loading branch information
AA-Turner authored Feb 7, 2025
1 parent cef9d86 commit b11303a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:
- name: Install Docutils ${{ matrix.docutils }}
run: uv pip install --upgrade "docutils~=${{ matrix.docutils }}.0"
- name: Test with pytest
run: python -m pytest -vv --durations 25
run: python -m pytest -n logical --dist=worksteal -vv --durations 25
env:
PYTHONWARNINGS: "error" # treat all warnings as errors

Expand Down Expand Up @@ -108,7 +108,7 @@ jobs:
- name: Install Docutils ${{ matrix.docutils }}
run: python -m pip install --upgrade "docutils~=${{ matrix.docutils }}.0"
- name: Test with pytest
run: python -m pytest -vv --durations 25
run: python -m pytest -n logical --dist=worksteal -vv --durations 25
env:
PYTHONWARNINGS: "error" # treat all warnings as errors

Expand Down Expand Up @@ -140,7 +140,7 @@ jobs:
python -m pip install --upgrade pip
python -m pip install .[test]
- name: Test with pytest
run: python -m pytest -vv --durations 25
run: python -m pytest -n logical --dist=worksteal -vv --durations 25
env:
PYTHONWARNINGS: "error" # treat all warnings as errors

Expand Down Expand Up @@ -173,7 +173,7 @@ jobs:
sed -i 's/flit_core>=3.7/flit_core @ git+https:\/\/github.com\/pypa\/flit.git#subdirectory=flit_core/' pyproject.toml
python -m pip install .[test]
- name: Test with pytest
run: python -m pytest -vv --durations 25
run: python -m pytest -n logical --dist=worksteal -vv --durations 25
env:
PYTHONWARNINGS: "error" # treat all warnings as errors

Expand Down Expand Up @@ -268,7 +268,7 @@ jobs:
- name: Install Docutils' HEAD
run: uv pip install "docutils @ git+https://repo.or.cz/docutils.git#subdirectory=docutils"
- name: Test with pytest
run: python -m pytest -vv
run: python -m pytest -n logical --dist=worksteal -vv
env:
PYTHONWARNINGS: "error" # treat all warnings as errors
DO_EPUBCHECK: "1"
Expand Down Expand Up @@ -301,7 +301,7 @@ jobs:
uv pip install .[test] --resolution lowest-direct
uv pip install alabaster==1.0.0
- name: Test with pytest
run: python -m pytest -vv --durations 25
run: python -m pytest -n logical --dist=worksteal -vv --durations 25
env:
PYTHONWARNINGS: "error" # treat all warnings as errors

Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ lint = [
]
test = [
"pytest>=8.0",
"pytest-xdist[psutil]>=3.4",
"defusedxml>=0.7.1", # for secure XML/HTML parsing
"cython>=3.0",
"setuptools>=70.0", # for Cython compilation
Expand Down

0 comments on commit b11303a

Please sign in to comment.