From 686ae632bd9fce16de8fab5e89a8019f5b21cefe 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 | 34 +++++++++++++++------------------- pyproject.toml | 2 +- tox.ini | 8 +------- 4 files changed, 18 insertions(+), 27 deletions(-) diff --git a/.config/dictionary.txt b/.config/dictionary.txt index 9f48d06803..e37dfd9e8f 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 abba51fc38..1df32bf8c5 100644 --- a/.github/workflows/tox.yml +++ b/.github/workflows/tox.yml @@ -62,6 +62,9 @@ jobs: # Number of expected test passes, safety measure for accidental skip of # tests. Update value if you add/remove tests. PYTEST_REQPASS: 804 + # Temporary disable parallelism under GHA until we sort concurrency issues + # related to collection installations. + PYTEST_ADDOPS: "-n1 --dist=loadscope --maxfail=1" steps: - name: Activate WSL1 if: "contains(matrix.shell, 'wsl')" @@ -86,25 +89,18 @@ jobs: ~/.cache/pre-commit key: pre-commit-${{ matrix.name || matrix.passed_name }}-${{ hashFiles('.pre-commit-config.yaml') }} - - name: Set ansible cache(s) - uses: actions/cache@v3 - with: - path: | - .cache/eco - examples/playbooks/collections/ansible_collections - ~/.cache/ansible-compat - ~/.ansible/collections - ~/.ansible/roles - key: ${{ matrix.name || matrix.passed_name }}-${{ hashFiles('tools/test-eco.sh', 'requirements.yml') }} - - - name: Set galaxy cache - uses: actions/cache@v3 - if: ${{ startsWith(matrix.passed_name, 'py') }} - with: - path: | - examples/playbooks/collections/*.tar.gz - examples/playbooks/collections/ansible_collections - key: galaxy-${{ hashFiles('examples/playbooks/collections/requirements.yml') }} + # - name: Set galaxy cache + # uses: actions/cache@v3 + # if: ${{ startsWith(matrix.passed_name, 'py') }} + # with: + # path: | + # .cache/eco + # ~/.cache/ansible-compat + # ~/.ansible/collections + # ~/.ansible/roles + # examples/playbooks/collections/*.tar.gz + # examples/playbooks/collections/ansible_collections + # key: galaxy-${{ hashFiles('examples/playbooks/collections/requirements.yml') }} - name: Set up Python ${{ matrix.python_version || '3.9' }} if: "!contains(matrix.shell, 'wsl')" diff --git a/pyproject.toml b/pyproject.toml index 5937c6a9c8..055d079e1a 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 b344f53311..f0cd0c27cd 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 =