projects
/
osm
/
devops.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
CharmHub and new kafka and zookeeper charms
[osm/devops.git]
/
installers
/
charm
/
ro
/
tox.ini
diff --git
a/installers/charm/ro/tox.ini
b/installers/charm/ro/tox.ini
index
1f9442e
..
f3c9144
100644
(file)
--- a/
installers/charm/ro/tox.ini
+++ b/
installers/charm/ro/tox.ini
@@
-21,21
+21,34
@@
#######################################################################################
[tox]
#######################################################################################
[tox]
-envlist = flake8, cover, pylint, safety, yamllint
-skipsdist = True
+envlist = black, cover, flake8, pylint, yamllint, safety
+skipsdist = true
+
+[tox:jenkins]
+toxworkdir = /tmp/.tox
[testenv]
basepython = python3.8
setenv =
VIRTUAL_ENV={envdir}
[testenv]
basepython = python3.8
setenv =
VIRTUAL_ENV={envdir}
- PYTHON
HASHSEED=0
- PYTHON
PATH = {toxinidir}/src
+ PYTHON
PATH = {toxinidir}:{toxinidir}/lib:{toxinidir}/src
+ PYTHON
DONTWRITEBYTECODE = 1
deps = -r{toxinidir}/requirements.txt
deps = -r{toxinidir}/requirements.txt
+
+#######################################################################################
+[testenv:black]
+deps = black
+commands =
+ black --check --diff src/ tests/
+
+
#######################################################################################
[testenv:cover]
deps = {[testenv]deps}
-r{toxinidir}/requirements-test.txt
#######################################################################################
[testenv:cover]
deps = {[testenv]deps}
-r{toxinidir}/requirements-test.txt
+ coverage
+ nose2
commands =
sh -c 'rm -f nosetests.xml'
coverage erase
commands =
sh -c 'rm -f nosetests.xml'
coverage erase
@@
-45,36
+58,34
@@
commands =
coverage xml -o coverage.xml --omit=*tests*
whitelist_externals = sh
coverage xml -o coverage.xml --omit=*tests*
whitelist_externals = sh
-#######################################################################################
-[testenv:safety]
-setenv =
- LC_ALL=C.UTF-8
- LANG=C.UTF-8
-deps = {[testenv]deps}
- -r{toxinidir}/requirements-test.txt
-commands =
- - safety check --full-report
#######################################################################################
[testenv:flake8]
#######################################################################################
[testenv:flake8]
-deps = flake8
+deps = flake8
+ flake8-import-order
commands =
flake8 src/ tests/
commands =
flake8 src/ tests/
+
#######################################################################################
[testenv:pylint]
deps = {[testenv]deps}
-r{toxinidir}/requirements-test.txt
#######################################################################################
[testenv:pylint]
deps = {[testenv]deps}
-r{toxinidir}/requirements-test.txt
- pylint
+ pylint
==2.10.2
commands =
commands =
- pylint -E src
+ pylint -E src/ tests/
+
#######################################################################################
#######################################################################################
-[testenv:black]
+[testenv:safety]
+setenv =
+ LC_ALL=C.UTF-8
+ LANG=C.UTF-8
deps = {[testenv]deps}
deps = {[testenv]deps}
- -r{toxinidir}/requirements-test.txt
- black
-commands = black --check --diff . --exclude "build/|.tox/|mod/|lib/"
+ safety
+commands =
+ - safety check --full-report
+
#######################################################################################
[testenv:yamllint]
#######################################################################################
[testenv:yamllint]
@@
-86,21
+97,22
@@
commands = yamllint .
#######################################################################################
[testenv:build]
passenv=HTTP_PROXY HTTPS_PROXY NO_PROXY
#######################################################################################
[testenv:build]
passenv=HTTP_PROXY HTTPS_PROXY NO_PROXY
-deps = {[testenv]deps}
- -r{toxinidir}/requirements-test.txt
- charmcraft
whitelist_externals =
charmcraft
whitelist_externals =
charmcraft
- cp
+ sh
commands =
commands =
- charmcraft build
- cp -r build release
+ charmcraft pack
+ sh -c 'ubuntu_version=20.04; \
+ architectures="amd64-aarch64-arm64"; \
+ charm_name=`cat metadata.yaml | grep -E "^name: " | cut -f 2 -d " "`; \
+ mv $charm_name"_ubuntu-"$ubuntu_version-$architectures.charm $charm_name.charm'
#######################################################################################
[flake8]
ignore =
W291,
W293,
#######################################################################################
[flake8]
ignore =
W291,
W293,
+ W503,
E123,
E125,
E226,
E123,
E125,
E226,
@@
-112,4
+124,5
@@
exclude =
max-line-length = 120
show-source = True
builtins = _
max-line-length = 120
show-source = True
builtins = _
-
+max-complexity = 10
+import-order-style = google