2017-09-02 09:40:25 +01:00
|
|
|
---
|
|
|
|
language: python
|
|
|
|
python: "2.7"
|
|
|
|
|
2017-11-17 09:57:28 +00:00
|
|
|
# Run jobs in VMs - sudo is required by ansible tests.
|
|
|
|
sudo: required
|
2017-09-02 09:40:25 +01:00
|
|
|
|
|
|
|
# Install ansible
|
|
|
|
addons:
|
|
|
|
apt:
|
|
|
|
packages:
|
|
|
|
- gcc
|
2017-11-17 09:57:28 +00:00
|
|
|
- python-apt
|
2017-09-02 09:40:25 +01:00
|
|
|
- python-virtualenv
|
2017-11-14 13:42:34 +00:00
|
|
|
- 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
|
2017-11-17 10:34:28 +00:00
|
|
|
# Run ansible syntax checks.
|
|
|
|
- TOX_ENV=ansible-syntax
|
2017-11-17 09:57:28 +00:00
|
|
|
# Run ansible tests.
|
|
|
|
- TOX_ENV=ansible
|
2018-02-08 11:56:11 +00:00
|
|
|
# Run molecule tests.
|
|
|
|
- TOX_ENV=molecule
|
2017-09-02 09:40:25 +01:00
|
|
|
|
|
|
|
install:
|
2017-11-17 09:57:28 +00:00
|
|
|
# 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
|
2017-09-02 09:40:25 +01:00
|
|
|
|
|
|
|
script:
|
2017-11-14 13:42:34 +00:00
|
|
|
# Run the tox environment.
|
2017-11-17 09:57:28 +00:00
|
|
|
- venv/bin/tox -e ${TOX_ENV}
|