Browse Source

[tests] pre create tox environments without enough

The py3_cache environment allows to create an environment with only the
dependencies, not the enough application.
keep-around/a99c46aaa465fae10ff9be767921b54f3a2ebd74
Pierre-Louis Bonicoli 9 months ago
parent
commit
a99c46aaa4
No known key found for this signature in database GPG Key ID: 6914C4A5EDAA6DD
  1. 7
      tests/tox.dockerfile
  2. 4
      tox.ini

7
tests/tox.dockerfile

@ -8,10 +8,13 @@ RUN apt-get install -y jq
RUN pip install tox yq
RUN apt-get install -y python3-apt python3-libvirt python3-lxml # required because python3 is used not python2
# END dependencies of test/ssh
COPY requirements.txt requirements-dev.txt tox.ini setup.cfg setup.py README.md /opt/
# Cache Python environment creations
COPY requirements.txt requirements-dev.txt tox.ini /opt/
RUN mkdir /opt/docs
COPY docs/requirements.txt /opt/docs/
RUN tox --notest
RUN tox --notest -e py3_cache,flake8,docs
# BEGIN dependencies enabling .test resolution in the test container
RUN apt-get install -y bind9
COPY tests/named.conf.local /etc/bind

4
tox.ini

@ -18,6 +18,10 @@ deps =
commands = coverage run --source=enough {envbindir}/py.test -vvv --durations 10 {posargs:tests}
coverage report --omit=*test*,*tox* --show-missing
[testenv:py3_cache]
skip_install = True
envdir={toxworkdir}/py3
[testenv:flake8]
commands = flake8 {posargs}
deps =

Loading…
Cancel
Save