Skip to content
Snippets Groups Projects
Commit e5153293 authored by nimrod's avatar nimrod
Browse files

- Cleaner Tox usage.

parent 2ecaa5ae
No related branches found
No related tags found
No related merge requests found
......@@ -9,14 +9,14 @@ env:
- VBOX_MEMORY=2048
matrix:
- TOXENV=pre-commit
- TOXENV=openbsd60
- &openbsd59 TOXENV=openbsd59
- TOXENV=xenial
- TOXENV=trusty
- TOXENV=precise
- &stretch TOXENV=stretch
- TOXENV=jessie
- TOXENV=wheezy
- tox_switches="--platform openbsd60"
- &openbsd59 tox_switches="--platform openbsd59"
- tox_switches="--platform xenial"
- tox_switches="--platform trusty"
- tox_switches="--platform precise"
- &stretch tox_switches="--platform stretch"
- tox_switches="--platform jessie"
- tox_switches="--platform wheezy"
matrix:
fast_finish: True
allow_failures:
......@@ -27,6 +27,7 @@ cache:
- pip
- directories:
- $HOME/.pre-commit
- .tox
install:
- sudo apt-get update
......@@ -36,7 +37,7 @@ install:
- pip install tox | cat
script:
- travis_wait 45 tox
- travis_wait 45 tox -- $tox_switches
notifications:
webhooks: https://galaxy.ansible.com/api/v1/notifications/
......
......@@ -31,21 +31,9 @@ See :code:`tests/playbook.yml`.
Testing
-------
Testing requires Python 2.7, Vagrant and Virtualbox. Install the Python
dependencies, dependent roles and roles required for testing:
.. code:: shell
pip install -r tests/requirements.txt
ansible-galaxy install git+file://$(pwd),$(git rev-parse --abbrev-ref HEAD) -p .molecule/roles
molecule dependency
To run the full test suite:
.. code:: shell
pre-commit run --all-files
molecule test --platform all
Testing requires Python 2.7, Tox, Vagrant and Virtualbox. To test simply run
:code:`tox`. `Pre-commit <http://pre-commit.com/>`_ is also setup for this
project.
License
-------
......
[tox]
skip_install = True
skipsdist = True
envlist = openbsd60,openbsd59,xenial,trusty,precise,stretch,jessie,wheezy
envlist = molecule
[testenv:pre-commit]
envdir = {toxinidir}/.tox
deps = -rtests/requirements.txt
passenv = HOME VBOX* ANSIBLE_*
whitelist_externals =
sh
commands =
......@@ -12,11 +14,12 @@ commands =
molecule dependency
pre-commit run --all-files
[testenv]
[testenv:molecule]
envdir = {toxinidir}/.tox
deps = -rtests/requirements.txt
passenv = HOME
passenv = HOME VBOX* ANSIBLE_*
whitelist_externals =
sh
commands =
sh -c "ansible-galaxy install git+file://$(pwd),$(git rev-parse --abbrev-ref HEAD) -p .molecule/roles"
molecule test --platform {envname}
molecule test {posargs}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment