Skip to content

Commit

Permalink
Workaround for tox w/o setup.py bug
Browse files Browse the repository at this point in the history
  • Loading branch information
ssbarnea committed Nov 25, 2021
1 parent 0fb8dee commit 3d85f75
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ requires =
pip >= 20.2.4

[testenv]
usedevelop = True
# both options needed to workaround https://github.com/tox-dev/tox/issues/2197
usedevelop = False
skip_install = True

# do not put * in passenv as it may break builds do to reduced isolation
passenv =
CI
Expand All @@ -45,19 +48,14 @@ setenv =
PYTHONUNBUFFERED=1
_EXTRAS=-l --cov=molecule --no-cov-on-fail --cov-report xml:{envlogdir}/coverage.xml --html={envlogdir}/reports.html --self-contained-html
deps =
--editable .[docker,lint,podman,test,windows]
devel: git+https://github.com/ansible/ansible#egg=ansible-core
# pytest-molecule not used but we want to check that it does not conflict
devel: git+https://github.com/ansible-community/pytest-molecule#egg=pytest-molecule
dockerfile: ansible>=2.10
selinux
py{36,37}: importlib-metadata>=0.12
py: ansible-core
extras =
docker
lint
podman
test
windows
; commands_pre =
; find {toxinidir} -type f -not -path '{toxinidir}/.tox/*' -path '*/__pycache__/*' -name '*.py[c|o]' -delete
; sh -c 'find {homedir}/.cache -type d -path "*/molecule_*" -exec rm -rfv \{\} +;'
Expand Down Expand Up @@ -123,8 +121,8 @@ commands =
python -c \
'import pathlib; '\
'docs_dir = pathlib.Path(r"{toxinidir}") / "docs/docstree/html"; index_file = docs_dir / "index.html"; print(f"\nDocumentation available under `file://\{index_file\}`\n\nTo serve docs, use `python3 -m http.server --directory \{docs_dir\} 0`\n")'
extras =
docs
deps =
--editable .[docs]

[testenv:docs-livereload]
description = Invoke sphinx-autobuild to build and reload the HTML docs
Expand All @@ -134,15 +132,16 @@ usedevelop = {[testenv:docs]usedevelop}
commands =
python -m sphinx_autobuild docs/ "{toxworkdir}/docs/html"
deps =
--editable .[docs]
sphinx-autobuild>=0.7.1,<1.0
extras =
docs

[testenv:dockerfile]
description = Tests validity of embedded Dockerfile template used by docker driver
commands =
ansible-playbook src/molecule/data/validate-dockerfile.yml
extras =
deps =
ansible-core
paramiko
docker
selinux

Expand Down

0 comments on commit 3d85f75

Please sign in to comment.