Use python3 for tox linting

fix tox python3 overrides We want to default to running all tox
environments under python 3, so set the basepython value in each
environment. We do not want to specify a minor version number, because
we do not want to have to update the file every time we upgrade python.
We do not want to set the override once in testenv, because that breaks
the more specific versions used in default environments like py35 and
py36.

Also, add tox-linters job to gate so that changes like this can merge.
The files section limit what runs - and if *nothing* run, there's no +2
from CI. Another reason to add this job is that we run voting jobs in
both check and gate, and this one was only in check.

Change-Id: I742695bfcd071c4930c4170553af7d9a59f6a432
This commit is contained in:
Sorin Sbarnea 2018-08-03 15:43:37 +01:00 committed by Andreas Jaeger
parent 1ab1df6de2
commit db10400e88
2 changed files with 6 additions and 1 deletions

View File

@ -11,10 +11,12 @@ deps = -r{toxinidir}/test-requirements.txt
commands = {posargs}
[testenv:pyflakes]
basepython = python3
deps = pyflakes
commands = pyflakes setup.py scripts
[testenv:linters]
basepython = python3
whitelist_externals = bash
commands = flake8 --max-line-length 80 {toxinidir} {posargs}

View File

@ -13,13 +13,13 @@
- tripleo-multinode-branchful
check:
jobs:
- openstack-tox-linters
- openstack-tox-py27:
files:
- ^scripts/emit_releases_file/.*$
- openstack-tox-py35:
files:
- ^scripts/emit_releases_file/.*$
- openstack-tox-linters
- tripleo-ci-centos-7-scenario001-multinode-oooq:
files:
- ^playbooks/tripleo-ci/.*$
@ -62,6 +62,9 @@
gate:
queue: tripleo
jobs:
# Don't put a files section on the linters job, otherwise no
# jobs might be defined and nothing can merge in this repo.
- openstack-tox-linters
- openstack-tox-py27:
files:
- ^scripts/emit_releases_file/.*$