Skip to content

Commit ca22634

Browse files
authored
Run pytest in parallel with pytest-xdist (#2515)
1 parent ccc3e05 commit ca22634

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,11 @@ jobs:
8484
if [ "${{ matrix.os }}" != "macos-latest" ]; then
8585
RUNPOSTGRES="--runpostgres"
8686
fi
87-
uv run pytest src/tests --runui $RUNPOSTGRES
87+
uv run pytest -n auto src/tests --runui $RUNPOSTGRES
8888
- name: Run pytest on Windows
8989
if: matrix.os == 'windows-latest'
9090
run: |
91-
uv run pytest src/tests --runui --runpostgres
91+
uv run pytest -n auto src/tests --runui --runpostgres
9292
9393
update-get-dstack:
9494
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,11 @@ jobs:
7575
if [ "${{ matrix.os }}" != "macos-latest" ]; then
7676
RUNPOSTGRES="--runpostgres"
7777
fi
78-
uv run pytest src/tests --runui $RUNPOSTGRES
78+
uv run pytest -n auto src/tests --runui $RUNPOSTGRES
7979
- name: Run pytest on Windows
8080
if: matrix.os == 'windows-latest'
8181
run: |
82-
uv run pytest src/tests --runui --runpostgres
82+
uv run pytest -n auto src/tests --runui --runpostgres
8383
8484
runner-test:
8585
defaults:

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ dev = [
8484
"freezegun>=1.5.1",
8585
"ruff>=0.11.2",
8686
"testcontainers>=4.9.2",
87+
"pytest-xdist>=3.6.1",
8788
]
8889

8990
[project.optional-dependencies]

0 commit comments

Comments
 (0)