test on 3 different ansible versions

This commit is contained in:
paulfantom 2018-06-25 10:52:16 +02:00
parent 30dcb8bf99
commit 3d98143bca
No known key found for this signature in database
GPG Key ID: 12AE0185401674E7
4 changed files with 35 additions and 8 deletions

1
.gitignore vendored
View File

@ -7,3 +7,4 @@ tests/__pycache__/
*.pyc
*.retry
.tox

View File

@ -1,7 +1,7 @@
---
language: python
python: "2.7"
cache: pip
# Use the new container infrastructure
sudo: required
@ -10,13 +10,19 @@ sudo: required
services:
- docker
# Install molecule
install:
- pip install -r test-requirements.txt
env:
matrix:
- ANSIBLE=2.3
- ANSIBLE=2.4
- ANSIBLE=2.5
# Execute the tests using the molecule docker driver
# Install tox
install:
- pip install tox-travis
# Execute tests
script:
- molecule test --all
- tox
notifications:
webhooks: https://galaxy.ansible.com/api/v1/notifications/

View File

@ -1,4 +1,4 @@
molecule>=2.15.0
docker-py>=1.10.0
PyYAML==3.12
docker
ansible-lint>=3.4.0
testinfra>=1.7.0

20
tox.ini Normal file
View File

@ -0,0 +1,20 @@
[tox]
minversion = 1.8
envlist = py{27}-ansible{23,24,25}
skipsdist = true
[travis:env]
ANSIBLE=
2.3: ansible23
2.4: ansible24
2.5: ansible25
[testenv]
passenv = *
deps =
-rtest-requirements.txt
ansible23: ansible<2.4
ansible24: ansible<2.5
ansible25: ansible<2.6
commands =
{posargs:molecule test --all --destroy always}