kayobe/.travis.yml
Mark Goddard 76309988ff Initial unit testing of ansible - kolla-ansible role
Adds a new tox environment, ansible, which runs ansible unit tests. One
such test has been implemented so far, for the kolla-ansible role.
2017-12-07 11:26:50 +00:00

40 lines
786 B
YAML

---
language: python
python: "2.7"
# Run jobs in VMs - sudo is required by ansible tests.
sudo: required
# Install ansible
addons:
apt:
packages:
- gcc
- python-apt
- python-virtualenv
- realpath
# Create a build matrix for the different test jobs.
env:
matrix:
# Run python style checks.
- TOX_ENV=pep8
# Build documentation.
- TOX_ENV=docs
# Run python2.7 unit tests.
- TOX_ENV=py27
# Run ansible syntax checks.
- TOX_ENV=ansible-syntax
# Run ansible tests.
- TOX_ENV=ansible
install:
# Install tox in a virtualenv to ensure we have an up to date version.
- virtualenv venv
- venv/bin/pip install -U pip
- venv/bin/pip install tox
script:
# Run the tox environment.
- venv/bin/tox -e ${TOX_ENV}