Add isort/flake8 tests

This commit is contained in:
Iacopo Spalletti 2015-07-18 16:55:46 +02:00
parent 71973ba8fc
commit 7e2a7a5387
4 changed files with 19 additions and 4 deletions

View File

@ -18,6 +18,8 @@ env:
- DJANGO='django17' CMS='cms30'
- DJANGO='django17' CMS='cms31'
- DJANGO='django17' CMS='cms32'
- TOXENV='pep8'
- TOXENV='isort'
# command to install dependencies, e.g. pip install -r requirements.txt --use-mirrors
@ -27,9 +29,10 @@ install:
- "if [[ $TRAVIS_PYTHON_VERSION == '2.7' ]]; then export PYVER=py27; fi"
- "if [[ $TRAVIS_PYTHON_VERSION == '3.3' ]]; then export PYVER=py33; fi"
- "if [[ $TRAVIS_PYTHON_VERSION == '3.4' ]]; then export PYVER=py34; fi"
- "if [[ ${DJANGO}z != 'z' ]]; then export TOXENV=$PYVER-$DJANGO-$CMS; fi"
# command to run tests, e.g. python setup.py test
script: COMMAND='coverage run' tox -e"$PYVER-$DJANGO-$CMS"
script: COMMAND='coverage run' tox -e$TOXENV
after_success: coveralls

View File

@ -23,7 +23,7 @@ clean-pyc:
find . -name '*~' -exec rm -f {} +
lint:
flake8 djangocms_blog
flake8 djangocms_blog tests
djangocms-helper djangocms_blog pyflakes --cms
test:

View File

@ -7,4 +7,8 @@ max-line-length = 99
license-file = LICENSE
[wheel]
universal = 1
universal = 1
[isort]
line_length = 99
skip = migrations, south_migrations

10
tox.ini
View File

@ -1,5 +1,5 @@
[tox]
envlist = py{26}-django{16}-cms{30,31,32},py{27,33,34}-django{16,17}-cms{30,31,32}
envlist = py{26}-django{16}-cms{30,31,32},py{27,33,34}-django{16,17}-cms{30,31,32},isort,pep8
[testenv]
commands = {env:COMMAND:python} setup.py test
@ -12,3 +12,11 @@ deps =
cms32: https://github.com/divio/django-cms/archive/develop.zip
py26: unittest2
-r{toxinidir}/requirements-test.txt
[testenv:isort]
deps = isort
commands = isort -c -rc djangocms_blog tests
[testenv:pep8]
deps = flake8
commands = flake8