Add additional tox environments to Travis

This commit is contained in:
Will Miller 2018-09-18 16:38:06 +00:00
parent 61e884e833
commit 1375df399a
2 changed files with 18 additions and 8 deletions

View File

@ -1,6 +1,5 @@
---
language: python
python: "2.7"
# Run jobs in VMs - sudo is required by ansible tests.
sudo: required
@ -15,12 +14,23 @@ addons:
- realpath
# Create a build matrix for the different test jobs.
env:
matrix:
# Run python style checks.
- TOX_ENV=pep8
matrix:
include:
# Run Python style checks.
- python: 3.5
env: TOX_ENV=pep8
# Run Ansible linting.
- TOX_ENV=alint
- python: 3.5
env: TOX_ENV=alint
# Run Python 3.5 tests.
- python: 3.5
env: TOX_ENV=py35
# Run Python 2.7 tests.
- python: 2.7
env: TOX_ENV=py27
# Run coverage checks.
- python: 3.5
env: TOX_ENV=cover
install:
# Install tox in a virtualenv to ensure we have an up to date version.

View File

@ -22,7 +22,7 @@ deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands =
stestr run {posargs}
stestr run --config {toxinidir}/.stestr.conf {posargs}
[testenv:pep8]
basepython = python2.7
@ -36,7 +36,7 @@ setenv =
PYTHON=coverage run --source tenks,ansible/action_plugins --parallel-mode
commands =
coverage erase
stestr run {posargs}
stestr run --config {toxinidir}/.stestr.conf {posargs}
coverage combine
coverage report
coverage html -d cover