Skip to content

Commit

Permalink
Temporary disable xdist on GHA
Browse files Browse the repository at this point in the history
Related: #3568
  • Loading branch information
ssbarnea committed Jun 19, 2023
1 parent c2a935b commit f283504
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 27 deletions.
1 change: 1 addition & 0 deletions .config/dictionary.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ EPIPE # linux
Fimport
Jython
MYTAG
PYTEST_ADDOPS
PYTHONBREAKPOINT
PYTHONIOENCODING
PYTHONPYCACHEPREFIX
Expand Down
34 changes: 15 additions & 19 deletions .github/workflows/tox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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')"
Expand All @@ -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')"
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 1 addition & 7 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down

0 comments on commit f283504

Please sign in to comment.