Skip to content

Commit c4f3401

Browse files
committed
try running tests with two workers
From https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories runners have 4 cores (apart from macos-11). We could use `-n auto`, but I hypothesis that for the e2e tests since we have one worker process per test process maybe we don't want to actually use up all the cores with test processes? It doesn't look like it's possible to tell pytest-xdist to use all core but one, or half the cores, or anything (issue herehttps://github.com/pytest-dev/pytest-xdist/issues/477). So lets just set it to 2 for now which should be a lot faster than 1, if it works.
1 parent 8b171c4 commit c4f3401

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,10 +230,10 @@ jobs:
230230
python -m pip install -U pip
231231
python -m pip install -U -r misc/requirements/requirements-tox.txt
232232
- name: "Run ${{ matrix.testenv }}"
233-
run: "dbus-run-session -- tox -e ${{ matrix.testenv }} -- ${{ matrix.args }}"
233+
run: "dbus-run-session -- tox -e ${{ matrix.testenv }} -- -n 2 ${{ matrix.args }}"
234234
if: "startsWith(matrix.os, 'ubuntu-')"
235235
- name: "Run ${{ matrix.testenv }} without DBus"
236-
run: "tox -e ${{ matrix.testenv }} -- ${{ matrix.args }}"
236+
run: "tox -e ${{ matrix.testenv }} -- -n 2 ${{ matrix.args }}"
237237
if: "!startsWith(matrix.os, 'ubuntu-')"
238238
- name: Analyze backtraces
239239
run: "bash scripts/dev/ci/backtrace.sh ${{ matrix.testenv }}"

0 commit comments

Comments
 (0)