WIP Create a zuul for black style
Create a format check Test Plan TODO - SUCCESS on black zuul Closes-bug: ##### Change-Id: I5d7b537e83931304ffd5f67ce51e8ebb44f7e65b Signed-off-by: Hugo Brito <hugo.brito@windriver.com>
This commit is contained in:
parent
8405f3b47c
commit
802659f4c3
13
.zuul.yaml
13
.zuul.yaml
|
@ -10,12 +10,14 @@
|
|||
- stx-distcloud-client-tox-pep8
|
||||
- stx-distcloud-client-tox-py39
|
||||
- stx-distcloud-client-tox-pylint
|
||||
- stx-distcloud-client-tox-black
|
||||
gate:
|
||||
jobs:
|
||||
- openstack-tox-linters
|
||||
- stx-distcloud-client-tox-pep8
|
||||
- stx-distcloud-client-tox-py39
|
||||
- stx-distcloud-client-tox-pylint
|
||||
- stx-distcloud-client-tox-black
|
||||
post:
|
||||
jobs:
|
||||
- stx-distcloud-client-upload-git-mirror
|
||||
|
@ -50,6 +52,17 @@
|
|||
tox_envlist: pep8
|
||||
tox_extra_args: -c distributedcloud-client/tox.ini
|
||||
|
||||
- job:
|
||||
name: stx-distcloud-client-tox-black
|
||||
parent: tox
|
||||
description: Run black for distcloud-client
|
||||
nodeset: debian-bullseye
|
||||
voting: false
|
||||
vars:
|
||||
python_version: 3.9
|
||||
tox_envlist: black_check
|
||||
tox_extra_args: -c distributedcloud-client/tox.ini
|
||||
|
||||
- job:
|
||||
name: stx-distcloud-client-upload-git-mirror
|
||||
parent: upload-git-mirror
|
||||
|
|
|
@ -23,7 +23,8 @@ import logging
|
|||
import os
|
||||
import sys
|
||||
|
||||
from cliff import app, commandmanager
|
||||
from cliff import app
|
||||
from cliff import commandmanager
|
||||
from cliff import help as cliff_help
|
||||
from osc_lib.command import command
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
envlist = py39,pep8,pylint
|
||||
minversion = 2.3
|
||||
skipsdist = True
|
||||
|
||||
toxworkdir = /tmp/{env:USER}_dc_client_tox
|
||||
|
||||
[dcclient]
|
||||
|
@ -10,17 +9,16 @@ client_base_dir = .
|
|||
|
||||
[testenv]
|
||||
basepython = python3.9
|
||||
install_command = pip install \
|
||||
-c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/starlingx/root/raw/branch/master/build-tools/requirements/debian/upper-constraints.txt} \
|
||||
{opts} {packages}
|
||||
setenv =
|
||||
VIRTUAL_ENV={envdir}
|
||||
OS_STDOUT_CAPTURE=1
|
||||
OS_STDERR_CAPTURE=1
|
||||
OS_TEST_TIMEOUT=60
|
||||
|
||||
deps = -r{toxinidir}/test-requirements.txt
|
||||
-r{toxinidir}/requirements.txt
|
||||
deps =
|
||||
-c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/starlingx/root/raw/branch/master/build-tools/requirements/debian/upper-constraints.txt}
|
||||
-r{toxinidir}/requirements.txt
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
|
||||
allowlist_externals =
|
||||
rm
|
||||
|
@ -51,6 +49,18 @@ exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build
|
|||
commands =
|
||||
pylint {posargs} dcmanagerclient --rcfile=./.pylintrc
|
||||
|
||||
[testenv:black]
|
||||
deps =
|
||||
black>=23.11.0 # MIT
|
||||
commands =
|
||||
black --line-length 85 {posargs} .
|
||||
|
||||
[testenv:black_check]
|
||||
deps =
|
||||
black>=23.11.0 # MIT
|
||||
commands =
|
||||
black --line-length 85 --check .
|
||||
|
||||
[testenv:cover]
|
||||
setenv =
|
||||
PYTHON=coverage run --parallel-mode
|
||||
|
|
Loading…
Reference in New Issue