Add gate for py3k compilance on fm-rest-api
Alot of work has gone into making sure that starlingx is python3 compatibity. To ensure that we remain python3 compatible add a pylint gate that runs with the --py3k argument to check for possible python3 syntax erorrs. Story: 2006796 Task: 43102 Signed-off-by: Bernardo Decco de Siqueira <bernardo.deccodesiqueira@windriver.com> Change-Id: I1275e8d1d0fd0d9e998a29a67372de4ed78a2c7d
This commit is contained in:
parent
0b4c0c89de
commit
b817f8da4d
13
.zuul.yaml
13
.zuul.yaml
|
@ -16,6 +16,7 @@
|
|||
- fault-rest-api-py27
|
||||
- fault-rest-api-py36
|
||||
- fault-rest-api-py39
|
||||
- fault-rest-api-py3k
|
||||
gate:
|
||||
jobs:
|
||||
- openstack-tox-linters
|
||||
|
@ -24,6 +25,7 @@
|
|||
- fault-rest-api-py27
|
||||
- fault-rest-api-py36
|
||||
- fault-rest-api-py39
|
||||
- fault-rest-api-py3k
|
||||
post:
|
||||
jobs:
|
||||
- stx-fault-upload-git-mirror
|
||||
|
@ -96,6 +98,17 @@
|
|||
bindep_profile: test py39
|
||||
python_version: 3.9
|
||||
tox_envlist: py39
|
||||
|
||||
- job:
|
||||
name: fault-rest-api-py3k
|
||||
parent: tox
|
||||
description: |
|
||||
Run py3k test for fm-rest-api
|
||||
nodeset: ubuntu-bionic
|
||||
required-projects:
|
||||
- starlingx/config
|
||||
vars:
|
||||
tox_envlist: py3k
|
||||
tox_extra_args: -c fm-rest-api/fm/tox.ini
|
||||
|
||||
- job:
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[tox]
|
||||
envlist = py27,py36,py39
|
||||
envlist = py27,py36,py39,py3k
|
||||
minversion = 2.3
|
||||
skipsdist = True
|
||||
stxdir = {toxinidir}/../../../
|
||||
|
@ -45,6 +45,16 @@ commands =
|
|||
stestr run {posargs}
|
||||
stestr slowest
|
||||
|
||||
[testenv:py3k]
|
||||
basepython = python3
|
||||
deps = {[testenv]deps}
|
||||
-e{toxinidir}/../../../config/tsconfig/tsconfig
|
||||
-e{toxinidir}/../../../config/sysinv/cgts-client/cgts-client
|
||||
-r{toxinidir}/../../requirements.txt
|
||||
-r{toxinidir}/../../test-requirements.txt
|
||||
|
||||
commands = pylint {posargs} --py3k -d W1618,W1641 fm
|
||||
|
||||
[testenv:cover]
|
||||
deps = {[testenv]deps}
|
||||
coverage
|
||||
|
|
4
tox.ini
4
tox.ini
|
@ -157,6 +157,10 @@ basepython = python3
|
|||
whitelist_externals = cat
|
||||
commands = cat /etc/fm/fm.conf
|
||||
|
||||
[testenv:py3k]
|
||||
basepython = python3
|
||||
description = Dummy environment to allow py3k to be run in subdir tox
|
||||
|
||||
[testenv:bandit]
|
||||
basepython = python3
|
||||
description = Bandit code scan for *.py files under config folder
|
||||
|
|
Loading…
Reference in New Issue