diff --git a/.travis.yml b/.travis.yml index 1ddbdb7..b8ad102 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,11 +1,40 @@ +sudo: false language: python -python: - - "2.7" - - "3.4" - - "3.5" - - "3.6" -script: - - flake8 django_migration_linter - - py.test + +matrix: + include: + - python: 2.7 + env: TOXENV=py27-django19 + - python: 2.7 + env: TOXENV=py27-django110 + - python: 2.7 + env: TOXENV=py27-django111 + + - python: 3.4 + env: TOXENV=py34-django19 + - python: 3.4 + env: TOXENV=py34-django110 + - python: 3.4 + env: TOXENV=py34-django111 + - python: 3.4 + env: TOXENV=py34-django20 + + - python: 3.5 + env: TOXENV=py35-django19 + - python: 3.5 + env: TOXENV=py35-django110 + - python: 3.5 + env: TOXENV=py35-django111 + - python: 3.5 + env: TOXENV=py35-django20 + + - python: 3.6 + env: TOXENV=py36-django111 + - python: 3.6 + env: TOXENV=py36-django20 + install: - - pip install -e ".[test]" + - pip install tox + +script: + - tox diff --git a/README.md b/README.md index 6c8e3b4..e807b18 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,7 @@ The linter will try to detect if the project is a django project and is versione ## Tests -The easiest way to run the tests is to invoke [py.test](https://docs.pytest.org/en/latest/). +The easiest way to run the tests is to invoke [tox](https://pypi.python.org/pypi/tox). ## License diff --git a/setup.py b/setup.py index 3ec8a73..8174304 100644 --- a/setup.py +++ b/setup.py @@ -26,8 +26,9 @@ install_requirements = [ ] test_requirements = [ + 'tox', 'pytest', - 'django', + 'django>=1.9', 'django-fake-database-backends', 'flake8' ] @@ -59,6 +60,10 @@ setup( 'Intended Audience :: Developers', 'Environment :: Web Environment', 'Framework :: Django', + 'Framework :: Django :: 1.9', + 'Framework :: Django :: 1.10', + 'Framework :: Django :: 1.11', + 'Framework :: Django :: 2.0', 'Programming Language :: Python', 'Programming Language :: Python :: 2', diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..694e751 --- /dev/null +++ b/tox.ini @@ -0,0 +1,24 @@ +[tox] +envlist = + py{27,34,35}-django19 + py{27,34,35}-django110 + py{27,34,35,36}-django111 + py{34,35,36}-django20 + lint + +[testenv] +commands = py.test {posargs} +extras = test +pip_pre = true +deps = + django19: django>=1.9,<1.10 + django110: django>=1.10,<1.11 + django111: django>=1.11,<2.0 + django20: django>=2.0 + +[testenv:lint] +basepython = python3.6 +deps = + flake8 +commands = + flake8 django_migration_linter