diff --git a/.gitignore b/.gitignore index b3d17c86..42b92c3e 100644 --- a/.gitignore +++ b/.gitignore @@ -52,4 +52,5 @@ reports/ coverage/ htmlcov/ acceptance_tests/*.png +.tox/ diff --git a/.travis.yml b/.travis.yml index 7bf99c85..f5e74f8f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,12 +1,19 @@ language: python -python: "2.7" +python: + - 2.7 +env: + - TOXENV=django18 + - TOXENV=django111 +matrix: + include: + - python: 2.7 + env: TOXENV=quality before_install: - export DJANGO_SETTINGS_MODULE=settings install: - "make install" sudo: false script: - - make quality - make test branches: only: diff --git a/AUTHORS b/AUTHORS index d616bfb9..82d014c3 100755 --- a/AUTHORS +++ b/AUTHORS @@ -1,3 +1,5 @@ Matt Drayer Zia Fazal Douglas Hall +Christina Roberts + diff --git a/Makefile b/Makefile index 87ba735a..18dca5cb 100644 --- a/Makefile +++ b/Makefile @@ -4,9 +4,10 @@ install-test: pip install -q -r test_requirements.txt install: install-test + pip install -q -r requirements.txt quality: - ./bin/quality.sh + tox -e quality -test: - ./bin/test.sh +test: ## run tests on every supported Python version + tox diff --git a/bin/quality.sh b/bin/quality.sh deleted file mode 100755 index 367d37ff..00000000 --- a/bin/quality.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env bash -set -e - -pep8 --config=.pep8 milestones -pylint --rcfile=.pylintrc milestones diff --git a/bin/test.sh b/bin/test.sh deleted file mode 100755 index ba7b0bb4..00000000 --- a/bin/test.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env bash -set -e - -export DJANGO_SETTINGS_MODULE=settings -echo 'Beginning Test Run...' -echo '' -echo 'Removing *.pyc files' -find . -name "*.pyc" -exec rm -rf {} \; - -echo 'Running test suite' -coverage run manage.py test --verbosity=3 -coverage report -m -coverage html -echo '' -echo 'View the full coverage report at {CODE_PATH}/edx-milestones/htmlcov/index.html' -echo '' -echo 'Testing Complete!' diff --git a/requirements.txt b/requirements.txt index d9d78d74..1571d25e 100755 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ # Django/Framework Packages -django>=1.8,<1.9 +django>=1.8,<2.0 django-model-utils # edX Packages diff --git a/setup.py b/setup.py index 2e91e83e..9bdefcd5 100755 --- a/setup.py +++ b/setup.py @@ -4,7 +4,7 @@ setup( name='edx-milestones', - version='0.1.10', + version='0.1.11', description='Significant events module for Open edX', long_description=open('README.md').read(), author='edX', @@ -21,7 +21,7 @@ ], packages=find_packages(exclude=["tests"]), install_requires=[ - "django>=1.8,<1.9", + "django>=1.8,<2.0", "django-model-utils", "edx-opaque-keys>=0.2.1,<1.0.0", ], diff --git a/test_requirements.txt b/test_requirements.txt index 6638ac64..2dd73329 100644 --- a/test_requirements.txt +++ b/test_requirements.txt @@ -1,9 +1,7 @@ --r requirements.txt - astroid==1.3.8 # Pinning to avoid backwards incompatibility issue with pylint/pylint-django coveralls coverage==3.7.1 -django_nose==1.4.1 +django_nose>=1.4.1 nose==1.3.3 httpretty==0.8.0 pep8==1.5.7 @@ -12,3 +10,4 @@ pep257==0.3.2 mock==1.0.1 testfixtures==4.0.0 ddt==0.8.0 +tox>=2.3.1,<3.0.0 diff --git a/tox.ini b/tox.ini new file mode 100644 index 00000000..2c72a019 --- /dev/null +++ b/tox.ini @@ -0,0 +1,22 @@ +[tox] +envlist = py27-django{18,111} + +[testenv] +setenv = + DJANGO_SETTINGS_MODULE = settings + PYTHONPATH = {toxinidir} + +deps = + django18: Django>=1.8,<1.9 + django111: Django>=1.11,<2.0 + -rtest_requirements.txt + +commands = + coverage run manage.py test --verbosity=3 + coverage report -m + coverage html + +[testenv:quality] +commands = + pep8 --config=.pep8 milestones + pylint --rcfile=.pylintrc milestones