Skip to content
Snippets Groups Projects
Select Git revision
  • d7656c8168cc24d407714f6e94e8b94b451706d9
  • master default
  • init_facts_module
3 results

tox.ini

Blame
    • nimrod's avatar
      d7656c81
      - Run tests from Tox, use generated environments. · d7656c81
      nimrod authored
      - Run tests in TravisCI on multiple Ansible, Python versions and OSes.
      - Create Docker container with Ansible.
      - Split tests to seperate files.
      - Moved everything test related to tests/ .
      - Update pre-commit hooks.
      - Merge .flake8 to tox.ini.
      - Added shellcheck hook.
      - Fixed issues found by shellcheck.
      - Updated README (added usage, testing sections).
      d7656c81
      History
      - Run tests from Tox, use generated environments.
      nimrod authored
      - Run tests in TravisCI on multiple Ansible, Python versions and OSes.
      - Create Docker container with Ansible.
      - Split tests to seperate files.
      - Moved everything test related to tests/ .
      - Update pre-commit hooks.
      - Merge .flake8 to tox.ini.
      - Added shellcheck hook.
      - Fixed issues found by shellcheck.
      - Updated README (added usage, testing sections).
    tox.ini 1.54 KiB
    [tox]
    skip_install = True
    skipsdist = True
    envlist = ansible{2.3.1.0,2.2.3.0,2.1.6.0,2.0.2.0}-image_{ubuntu_xenial,ubuntu_trusty,ubuntu_precise,debian_stretch,debian_jessie,debian_wheezy}, pre-commit
    
    [testenv]
    basepython = python2.7
    deps =
        ansible2.3.1.0: ansible==2.3.1.0
        ansible2.2.3.0: ansible==2.2.3.0
        ansible2.1.6.0: ansible==2.1.6.0
        ansible2.0.2.0: ansible==2.0.2.0
        docker-py>=1.7.0
    passenv = TERM HOME VBOX* ANSIBLE_*
    setenv =
        ANSIBLE_VERBOSITY=2
    changedir = {toxinidir}/tests/
    commands =
        ansible-galaxy install -r requirements.yaml
        image_ubuntu_xenial:  ansible-playbook playbook.yaml -e "distro=ubuntu release=xenial"  -i localhost, {posargs}
        image_ubuntu_trusty:  ansible-playbook playbook.yaml -e "distro=ubuntu release=trusty"  -i localhost, {posargs}
        image_ubuntu_precise: ansible-playbook playbook.yaml -e "distro=ubuntu release=precise" -i localhost, {posargs}
        image_debian_stretch: ansible-playbook playbook.yaml -e "distro=debian release=stretch" -i localhost, {posargs}
        image_debian_jessie:  ansible-playbook playbook.yaml -e "distro=debian release=jessie"  -i localhost, {posargs}
        image_debian_wheezy:  ansible-playbook playbook.yaml -e "distro=debian release=wheezy"  -i localhost, {posargs}
    
    [testenv:pre-commit]
    deps =
        pre-commit
        ansible
    passenv = TERM HOME VBOX* ANSIBLE_*
    setenv =
        ANSIBLE_ROLES_PATH={toxinidir}/tests/roles
    changedir = {toxinidir}/
    commands =
        ansible-galaxy install -r tests/requirements.yaml
        pre-commit run --all-files
    
    [flake8]
    exclude = ldap/ldap_attr.py