OSPurge; rework tox.ini to test multiple versions of Python
Change-Id: I01e0b61c1a39c9ce8fe425ac4c0922fc8c18ce4e
This commit is contained in:
parent
3a612efd53
commit
3ea94225fc
@ -2,7 +2,6 @@ bashate>=0.2 # Apache-2.0
|
|||||||
coverage>=4.0 # Apache-2.0
|
coverage>=4.0 # Apache-2.0
|
||||||
doc8 # Apache-2.0
|
doc8 # Apache-2.0
|
||||||
hacking>=0.12.0,<0.13 # Apache-2.0
|
hacking>=0.12.0,<0.13 # Apache-2.0
|
||||||
mypy-lang
|
|
||||||
openstackdocstheme>=1.5.0 # Apache-2.0
|
openstackdocstheme>=1.5.0 # Apache-2.0
|
||||||
sphinx>=1.2.1,!=1.3b1,<1.4 # BSD
|
sphinx>=1.2.1,!=1.3b1,<1.4 # BSD
|
||||||
testrepository>=0.0.18 # Apache-2.0/BSD
|
testrepository>=0.0.18 # Apache-2.0/BSD
|
||||||
|
18
tox.ini
18
tox.ini
@ -1,5 +1,5 @@
|
|||||||
[tox]
|
[tox]
|
||||||
envlist = pep8,pip-check-reqs,coverage
|
envlist = pep8,pip-check-reqs,cover,py35
|
||||||
minversion = 1.9
|
minversion = 1.9
|
||||||
skipsdist = True
|
skipsdist = True
|
||||||
|
|
||||||
@ -7,10 +7,15 @@ skipsdist = True
|
|||||||
deps =
|
deps =
|
||||||
-r{toxinidir}/requirements.txt
|
-r{toxinidir}/requirements.txt
|
||||||
-r{toxinidir}/test-requirements.txt
|
-r{toxinidir}/test-requirements.txt
|
||||||
basepython = python3.5
|
basepython =
|
||||||
|
run,pep8,cover,mypy,pip-check-reqs,py35: python3.5
|
||||||
|
docs,venv: python2
|
||||||
commands =
|
commands =
|
||||||
python setup.py testr --testr-args='{posargs}'
|
python setup.py testr --testr-args='{posargs}'
|
||||||
|
|
||||||
|
[testenv:venv]
|
||||||
|
commands = {posargs}
|
||||||
|
|
||||||
[testenv:run]
|
[testenv:run]
|
||||||
usedevelop=True
|
usedevelop=True
|
||||||
deps =
|
deps =
|
||||||
@ -28,16 +33,17 @@ commands =
|
|||||||
bash -c "find {toxinidir}/tools -type f -name *.sh \
|
bash -c "find {toxinidir}/tools -type f -name *.sh \
|
||||||
-print0 | xargs -0 bashate -v -iE006 -eE005,E042"
|
-print0 | xargs -0 bashate -v -iE006 -eE005,E042"
|
||||||
|
|
||||||
[testenv:coverage]
|
[testenv:cover]
|
||||||
commands =
|
commands =
|
||||||
coverage erase
|
coverage erase
|
||||||
coverage run --source=ospurge -m unittest discover --verbose
|
python setup.py testr --coverage --omit="ospurge/tests/*" --testr-args='{posargs}'
|
||||||
coverage report --omit="ospurge/tests/*" --show-missing --skip-covered --fail-under 100
|
coverage report --omit="ospurge/tests/*" --show-missing --fail-under 100
|
||||||
|
|
||||||
[testenv:mypy]
|
[testenv:mypy]
|
||||||
skip_install = True
|
skip_install = True
|
||||||
deps =
|
deps =
|
||||||
-r{toxinidir}/test-requirements.txt
|
-r{toxinidir}/test-requirements.txt
|
||||||
|
mypy-lang;python_version>'3.2'
|
||||||
commands =
|
commands =
|
||||||
mypy --check-untyped-defs --disallow-untyped-defs --silent-imports ospurge
|
mypy --check-untyped-defs --disallow-untyped-defs --silent-imports ospurge
|
||||||
|
|
||||||
@ -59,7 +65,7 @@ deps =
|
|||||||
-r{toxinidir}/test-requirements.txt
|
-r{toxinidir}/test-requirements.txt
|
||||||
commands =
|
commands =
|
||||||
doc8 -e .rst doc/source README.rst
|
doc8 -e .rst doc/source README.rst
|
||||||
python setup.py build_sphinx -E -b html
|
python setup.py build_sphinx -E
|
||||||
echo "Documentation location: {toxinidir}/doc/build/html/index.html"
|
echo "Documentation location: {toxinidir}/doc/build/html/index.html"
|
||||||
|
|
||||||
[flake8]
|
[flake8]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user