Skip to content

Commit

Permalink
tox: refactor configuration
Browse files Browse the repository at this point in the history
* Bump the minimum version to a more modern 3.0.0.
* Simplify configuration keeping the same envdir structure.

Change-Id: I4e948fafb18b230e0c9404f415c76a958bc67fd7
  • Loading branch information
volans- committed May 14, 2019
1 parent 66dea1e commit 724decc
Showing 1 changed file with 20 additions and 77 deletions.
97 changes: 20 additions & 77 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
[tox]
minversion = 1.6
minversion = 3.0.0
envlist = py{35,36,37}-{flake8,unit,unit-min,unitbase,bandit,prospector,sphinx}
skip_missing_interpreters = True

[testenv]
usedevelop = True
basepython =
py37: python3.7
py36: python3.6
py35: python3.5
whitelist_externals = sed
description =
flake8: Style consistency checker
Expand All @@ -19,10 +15,19 @@ description =
sphinx: Build documentation and manpages
integration: Run integration tests
min: [minimum supported version of dependencies]
py37: (Python 3.7)
py36: (Python 3.6)
py35: (Python 3.5)
envdir = {toxworkdir}/py36-tests
py36: (Python 3.6)
py37: (Python 3.7)
envdir =
py35-unitbase: {toxworkdir}/py35-tests-base
py36-unitbase: {toxworkdir}/py36-tests-base
py37-unitbase: {toxworkdir}/py37-tests-base
py35-min: {toxworkdir}/py35-tests-min
py36-min: {toxworkdir}/py36-tests-min
py37-min: {toxworkdir}/py37-tests-min
py35-!unitbase-!min: {toxworkdir}/py35-tests
py36-!unitbase-!min: {toxworkdir}/py36-tests
py37-!unitbase-!min: {toxworkdir}/py37-tests
commands =
flake8: flake8 setup.py cumin doc
unit: py.test -p no:logging --strict --cov-report=term-missing --cov=cumin cumin/tests/unit {posargs}
Expand All @@ -37,84 +42,22 @@ commands =
sphinx: sed -i='' -e 's/^\.B/.B /' '{toxinidir}/doc/build/man/cumin.1'
integration: "{toxinidir}/cumin/tests/integration/docker.sh" "transports/clustershell"
deps =
# Use install_requires and the additional extras_require[tests] from setup.py, force the minimum version for
# environments where 'min' is one of the dash-separated token.
# Use install_requires and the additional extras_require[NAME] from setup.py
unitbase: .[tests-base]
min: .[tests-min]
.[tests]
!min-!unitbase: .[tests]
setenv =
min: CUMIN_MIN_DEPS=1
integration: USER=root
integration: SUDO_USER=integration-tests

# All the below are needed until https://github.com/tox-dev/tox/issues/659 is resolved
[testenv:py37-flake8]
envdir = {toxworkdir}/py37-tests

[testenv:py37-unit]
envdir = {toxworkdir}/py37-tests

[testenv:py37-unit-min]
envdir = {toxworkdir}/py37-tests-min

[testenv:py37-unitbase]
envdir = {toxworkdir}/py37-tests-base
deps = .[tests-base]

[testenv:py37-bandit]
envdir = {toxworkdir}/py37-tests

[testenv:py37-prospector]
envdir = {toxworkdir}/py37-tests

[testenv:py37-sphinx]
envdir = {toxworkdir}/py37-tests

[testenv:py37-integration]
envdir = {toxworkdir}/py37-tests

[testenv:py37-integration-min]
envdir = {toxworkdir}/py37-tests-min

[testenv:py36-unit-min]
envdir = {toxworkdir}/py36-tests-min

[testenv:py36-unitbase]
envdir = {toxworkdir}/py36-tests-base
deps = .[tests-base]

# Needed it until https://github.com/tox-dev/tox/issues/505 is resolved
[testenv:py36-integration]

[testenv:py36-integration-min]
envdir = {toxworkdir}/py36-tests-min

[testenv:py35-flake8]
envdir = {toxworkdir}/py35-tests

[testenv:py35-unit]
envdir = {toxworkdir}/py35-tests

[testenv:py35-unit-min]
envdir = {toxworkdir}/py35-tests-min

[testenv:py35-unitbase]
envdir = {toxworkdir}/py35-tests-base
deps = .[tests-base]

[testenv:py35-bandit]
envdir = {toxworkdir}/py35-tests

[testenv:py35-prospector]
envdir = {toxworkdir}/py35-tests

[testenv:py35-sphinx]
envdir = {toxworkdir}/py35-tests

[testenv:py35-integration]
envdir = {toxworkdir}/py35-tests

[testenv:py36-integration]
[testenv:py37-integration]
[testenv:py35-integration-min]
envdir = {toxworkdir}/py35-tests-min
[testenv:py36-integration-min]
[testenv:py37-integration-min]

[flake8]
max-line-length = 120
Expand Down

0 comments on commit 724decc

Please sign in to comment.