From ab9a77cf6e8e1d77be8048d51f81d78ec19121cf Mon Sep 17 00:00:00 2001 From: Sorin Sbarnea Date: Thu, 15 Jun 2023 16:07:33 +0100 Subject: [PATCH] Temporary disable xdist on GHA Related: #3568 --- .config/dictionary.txt | 1 + .github/workflows/tox.yml | 3 +++ pyproject.toml | 2 +- tox.ini | 8 +------- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/.config/dictionary.txt b/.config/dictionary.txt index 9f48d068039..e37dfd9e8f4 100644 --- a/.config/dictionary.txt +++ b/.config/dictionary.txt @@ -13,6 +13,7 @@ EPIPE # linux Fimport Jython MYTAG +PYTEST_ADDOPS PYTHONBREAKPOINT PYTHONIOENCODING PYTHONPYCACHEPREFIX diff --git a/.github/workflows/tox.yml b/.github/workflows/tox.yml index abba51fc382..4abea378990 100644 --- a/.github/workflows/tox.yml +++ b/.github/workflows/tox.yml @@ -16,6 +16,9 @@ concurrency: env: FORCE_COLOR: 1 # tox, pytest, ansible-lint PY_COLORS: 1 + # Temporary disable parallelism under GHA until we sort concurrency issues + # related to collection installations. + PYTEST_ADDOPS: "-n1" jobs: pre: diff --git a/pyproject.toml b/pyproject.toml index 5937c6a9c8f..055d079e1a0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -174,7 +174,7 @@ include = ["src"] [tool.pytest.ini_options] # do not add options here as this will likely break either console runs or IDE # integration like vscode or pycharm -addopts = "-p no:pytest_cov" +addopts = "-p no:pytest_cov -n auto -ra --showlocals --doctest-modules --durations=10" # https://code.visualstudio.com/docs/python/testing # coverage is re-enabled in `tox.ini`. That approach is safer than # `--no-cov` which prevents activation from tox.ini and which also fails diff --git a/tox.ini b/tox.ini index b344f533116..f0cd0c27cda 100644 --- a/tox.ini +++ b/tox.ini @@ -29,13 +29,7 @@ commands_pre = commands = # safety measure to assure we do not accidentally run tests with broken dependencies {envpython} -m pip check - coverage run -m pytest {posargs:\ - -n auto \ - -ra \ - --showlocals \ - --doctest-modules \ - --durations=10 \ - } + coverage run -m pytest {posargs:} sh -c "coverage combine -a -q --data-file=.coverage .tox/.coverage.*" passenv =