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..249f026e46b 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" 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 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 =