Update tox and fix broken url
Remove python2 tests Point .gitreview at the correct repo Add .zuul.yaml Remove .coveragerc Change-Id: Id58e501ae9270fe4f3c593a6d01a9d3654c9b598
This commit is contained in:
@@ -1,6 +0,0 @@
|
|||||||
[report]
|
|
||||||
# Regexes for lines to exclude from consideration
|
|
||||||
exclude_lines =
|
|
||||||
if __name__ == .__main__.:
|
|
||||||
include=
|
|
||||||
hooks/cinder_*
|
|
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,4 +1,5 @@
|
|||||||
bin
|
bin
|
||||||
|
cover
|
||||||
.coverage
|
.coverage
|
||||||
.testrepository
|
.testrepository
|
||||||
.tox
|
.tox
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
[gerrit]
|
[gerrit]
|
||||||
host=review.openstack.org
|
host=review.openstack.org
|
||||||
port=29418
|
port=29418
|
||||||
project=openstack/charm-cinder-backup.git
|
project=openstack/charm-cinder-backup-swift-proxy.git
|
||||||
|
5
.zuul.yaml
Normal file
5
.zuul.yaml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
- project:
|
||||||
|
templates:
|
||||||
|
- python35-charm-jobs
|
||||||
|
- openstack-python3-ussuri-jobs
|
||||||
|
- openstack-cover-jobs
|
76
tox.ini
76
tox.ini
@@ -1,66 +1,92 @@
|
|||||||
# Source charm: ./tox.ini
|
# Source charm: ./tox.ini
|
||||||
# This file is managed centrally by release-tools and should not be modified
|
# This file is managed centrally by release-tools and should not be modified
|
||||||
# within individual charm repos.
|
# within individual charm repos. See the 'global' dir contents for available
|
||||||
|
# choices of tox.ini for OpenStack Charms:
|
||||||
|
# https://github.com/openstack-charmers/release-tools
|
||||||
|
|
||||||
[tox]
|
[tox]
|
||||||
skipsdist = True
|
skipsdist = True
|
||||||
envlist = pep8,py35,py36
|
envlist = pep8,py3
|
||||||
skip_missing_interpreters = True
|
# NOTE: Avoid build/test env pollution by not enabling sitepackages.
|
||||||
|
sitepackages = False
|
||||||
|
# NOTE: Avoid false positives by not skipping missing interpreters.
|
||||||
|
skip_missing_interpreters = False
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
setenv = VIRTUAL_ENV={envdir}
|
setenv = VIRTUAL_ENV={envdir}
|
||||||
PYTHONHASHSEED=0
|
PYTHONHASHSEED=0
|
||||||
TERM=linux
|
TERM=linux
|
||||||
CHARM_LAYERS_DIR={toxinidir}/layers
|
LAYER_PATH={toxinidir}/layers
|
||||||
CHARM_INTERFACES_DIR={toxinidir}/interfaces
|
INTERFACE_PATH={toxinidir}/interfaces
|
||||||
JUJU_REPOSITORY={toxinidir}/build
|
JUJU_REPOSITORY={toxinidir}/build
|
||||||
passenv = http_proxy https_proxy
|
passenv = http_proxy https_proxy INTERFACE_PATH LAYER_PATH JUJU_REPOSITORY
|
||||||
install_command =
|
install_command =
|
||||||
pip install {opts} {packages}
|
pip install {opts} {packages}
|
||||||
deps =
|
deps =
|
||||||
-r{toxinidir}/requirements.txt
|
-r{toxinidir}/requirements.txt
|
||||||
|
|
||||||
[testenv:build]
|
[testenv:build]
|
||||||
basepython = python2.7
|
basepython = python3
|
||||||
commands =
|
commands =
|
||||||
charm build --log-level DEBUG -o {toxinidir}/build src {posargs}
|
charm-build --log-level DEBUG -o {toxinidir}/build src {posargs}
|
||||||
|
|
||||||
[testenv:py27]
|
|
||||||
basepython = python2.7
|
|
||||||
# Reactive source charms are Python3-only, but a py27 unit test target
|
|
||||||
# is required by OpenStack Governance. Remove this shim as soon as
|
|
||||||
# permitted. http://governance.openstack.org/reference/cti/python_cti.html
|
|
||||||
whitelist_externals = true
|
|
||||||
commands = true
|
|
||||||
|
|
||||||
[testenv:py3]
|
[testenv:py3]
|
||||||
basepython = python3
|
basepython = python3
|
||||||
deps = -r{toxinidir}/test-requirements.txt
|
deps = -r{toxinidir}/test-requirements.txt
|
||||||
commands = stestr run {posargs}
|
commands = stestr run --slowest {posargs}
|
||||||
|
|
||||||
[testenv:py34]
|
|
||||||
basepython = python3.4
|
|
||||||
deps = -r{toxinidir}/test-requirements.txt
|
|
||||||
commands = stestr run {posargs}
|
|
||||||
|
|
||||||
[testenv:py35]
|
[testenv:py35]
|
||||||
basepython = python3.5
|
basepython = python3.5
|
||||||
deps = -r{toxinidir}/test-requirements.txt
|
deps = -r{toxinidir}/test-requirements.txt
|
||||||
commands = stestr run {posargs}
|
commands = stestr run --slowest {posargs}
|
||||||
|
|
||||||
[testenv:py36]
|
[testenv:py36]
|
||||||
basepython = python3.6
|
basepython = python3.6
|
||||||
deps = -r{toxinidir}/test-requirements.txt
|
deps = -r{toxinidir}/test-requirements.txt
|
||||||
commands = stestr run {posargs}
|
commands = stestr run --slowest {posargs}
|
||||||
|
|
||||||
|
[testenv:py37]
|
||||||
|
basepython = python3.7
|
||||||
|
deps = -r{toxinidir}/test-requirements.txt
|
||||||
|
commands = stestr run --slowest {posargs}
|
||||||
|
|
||||||
[testenv:pep8]
|
[testenv:pep8]
|
||||||
basepython = python3
|
basepython = python3
|
||||||
deps = -r{toxinidir}/test-requirements.txt
|
deps = -r{toxinidir}/test-requirements.txt
|
||||||
commands = flake8 {posargs} src unit_tests
|
commands = flake8 {posargs} src unit_tests
|
||||||
|
|
||||||
|
[testenv:cover]
|
||||||
|
# Technique based heavily upon
|
||||||
|
# https://github.com/openstack/nova/blob/master/tox.ini
|
||||||
|
basepython = python3
|
||||||
|
deps = -r{toxinidir}/requirements.txt
|
||||||
|
-r{toxinidir}/test-requirements.txt
|
||||||
|
setenv =
|
||||||
|
{[testenv]setenv}
|
||||||
|
PYTHON=coverage run
|
||||||
|
commands =
|
||||||
|
coverage erase
|
||||||
|
stestr run --slowest {posargs}
|
||||||
|
coverage combine
|
||||||
|
coverage html -d cover
|
||||||
|
coverage xml -o cover/coverage.xml
|
||||||
|
coverage report
|
||||||
|
|
||||||
|
[coverage:run]
|
||||||
|
branch = True
|
||||||
|
concurrency = multiprocessing
|
||||||
|
parallel = True
|
||||||
|
source =
|
||||||
|
.
|
||||||
|
omit =
|
||||||
|
.tox/*
|
||||||
|
*/charmhelpers/*
|
||||||
|
unit_tests/*
|
||||||
|
|
||||||
[testenv:venv]
|
[testenv:venv]
|
||||||
basepython = python3
|
basepython = python3
|
||||||
commands = {posargs}
|
commands = {posargs}
|
||||||
|
|
||||||
[flake8]
|
[flake8]
|
||||||
# E402 ignore necessary for path append before sys module import in actions
|
# E402 ignore necessary for path append before sys module import in actions
|
||||||
ignore = E402
|
ignore = E402,W504
|
Reference in New Issue
Block a user