[tox]
minversion=2.3.1
envlist =
    py{27,35}-{flake8,pylint,unit}
    py27-{yamllint,ansible_syntax,generate_validation}
skipsdist=True
skip_missing_interpreters=True

[testenv]
skip_install=True
setenv =
    ANSIBLE_CONFIG = ./ansible.cfg
    ANSIBLE_INVENTORY = {toxinidir}/test/tox-inventory.txt
    ANSIBLE_LOG_PATH=/tmp/tox/ansible/ansible.log
    ANSIBLE_LOCAL_TEMP=/tmp/tox/ansible
    ANSIBLE_CACHE_PLUGIN_CONNECTION=/tmp/tox/ansible/facts

deps =
    -rrequirements.txt
    -rtest-requirements.txt
    py35-flake8: flake8-bugbear==17.3.0

commands =
    unit: pytest {posargs}
    flake8: flake8 {posargs}
    pylint: python setup.py lint
    yamllint: python setup.py yamllint
    generate_validation: python setup.py generate_validation
    ansible_syntax: python setup.py ansible_syntax
