From 1375df399a7d476fe8a41cd26b14294d9f798a91 Mon Sep 17 00:00:00 2001 From: Will Miller Date: Tue, 18 Sep 2018 16:38:06 +0000 Subject: [PATCH] Add additional tox environments to Travis --- .travis.yml | 22 ++++++++++++++++------ tox.ini | 4 ++-- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index 570bce4..1aab0ae 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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. diff --git a/tox.ini b/tox.ini index bec29c4..7bb19aa 100644 --- a/tox.ini +++ b/tox.ini @@ -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