modified initial config for travis-ci

The following has been removed:

- HTML report, as it is not used at all and may require to define more
  environment

The following has been added:

- py27, py33, py34 specific coverage reports

NOTES:

- It is possible to use environment generators (http://tox.readthedocs.org/en/latest/config.html#generating-environments-conditional-settings)
  but this will make the implicit mode run more modes by default.
- As referenced at https://bitbucket.org/hpk42/tox/issue/120/substitution-breaks-for-commands,
  substitution for commands does not work yet. If substitution for commands is
  implemented someday, the tox.ini file would be simpler.
This commit is contained in:
Fernand Lone-Sang 2015-02-16 11:13:25 +01:00
parent 35d7964d3c
commit 9bbbf40230
2 changed files with 41 additions and 24 deletions

View File

@ -5,10 +5,9 @@
language: python
env:
- TOX_ENV=py27
- TOX_ENV=py33
- TOX_ENV=py34
- TOX_ENV=coverage
- TOX_ENV=py27,py27-coverage
- TOX_ENV=py33,py33-coverage
- TOX_ENV=py34,py34-coverage
- TOX_ENV=pep8
before_install:
@ -63,4 +62,5 @@ install:
- pip install tox
script:
- tox --version
- tox -e $TOX_ENV

57
tox.ini
View File

@ -1,27 +1,44 @@
[tox]
envlist = py27, py33, py34
minversion = 1.4
envlist = py27, py33, py34
[pep8]
exclude = qpol.py
max-line-length = 100
[testenv:pep8]
deps = pep8
commands = pep8 setools/ setools/policyrep/ tests/ \
seinfo seinfoflow sedta sesearch \
--exclude qpol.py --statistics --max-line-length=100
deps = pep8
commands = pep8 --version
pep8 setools/ tests/ seinfo seinfoflow sedta sesearch --statistics -v
[testenv:coverage]
deps = networkx==1.9
coverage
commands = coverage erase
coverage run setup.py test
coverage report
[testenv:py27-coverage]
basepython = python2.7
deps = {[testenv]deps}
coverage
commands = coverage --version
coverage erase
coverage run setup.py test
coverage report
[testenv:coverage-html]
deps = networkx==1.9
coverage
commands = coverage erase
coverage run setup.py test
coverage report
coverage html
[testenv:py33-coverage]
basepython = python3.3
deps = {[testenv]deps}
coverage
commands = coverage --version
coverage erase
coverage run setup.py test
coverage report
[testenv:py34-coverage]
basepython = python3.4
deps = {[testenv]deps}
coverage
commands = coverage --version
coverage erase
coverage run setup.py test
coverage report
[testenv]
deps = networkx==1.9
commands = {envpython} setup.py test
deps = networkx==1.9
commands = {envpython} setup.py test
recreate = True