Add tox to test different python and django versions
This commit is contained in:
1 parent
71b29d9694
commit
ad3b17229c
4 files changed
+69
-11
No files matched your search
+38
-9
@@ -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
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -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
|
||||
Reference in new issue
Block a user