From 35dd113f5fcbb9b2c632282500eea350eeed273e Mon Sep 17 00:00:00 2001 From: Wes Okes Date: Fri, 27 Apr 2018 17:32:43 -0400 Subject: [PATCH] tox --- .travis.yml | 48 +++++++++++++++++++++------ requirements/requirements-testing.txt | 6 ++++ setup.py | 1 + smart_manager/docs/release_notes.rst | 4 +++ smart_manager/version.py | 2 +- tox.ini | 28 ++++++++++++++++ 6 files changed, 77 insertions(+), 12 deletions(-) create mode 100644 requirements/requirements-testing.txt create mode 100644 tox.ini diff --git a/.travis.yml b/.travis.yml index ded4848..d876e94 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,19 +1,45 @@ -sudo: false language: python + +sudo: false + python: - - '3.5' - - '3.6' + - "2.7" + - "3.4" + - "3.5" + - "3.6" + env: - global: - - DB=postgres matrix: - - DJANGO=">=1.11,<2.0" - - DJANGO=">=2.0,<2.1" + - DJANGO=1.11 + - DJANGO=2.0 + - DJANGO=master + +addons: + postgresql: '9.5' + +matrix: + include: + - { python: "3.6", env: TOXENV=flake8 } + + exclude: + - { python: "2.7", env: DJANGO=master } + - { python: "2.7", env: DJANGO=2.0 } + - { python: "3.4", env: DJANGO=master } + + allow_failures: + - env: DJANGO=master + install: - - pip install -q coverage flake8 Django$DJANGO django-nose>=1.4 + - pip install tox-travis + before_script: - psql -c 'CREATE DATABASE smart_manager;' -U postgres + script: - - flake8 . - - coverage run setup.py test - - coverage report --fail-under=100 + - tox + +after_success: + coveralls + +notifications: + email: false diff --git a/requirements/requirements-testing.txt b/requirements/requirements-testing.txt new file mode 100644 index 0000000..f10a135 --- /dev/null +++ b/requirements/requirements-testing.txt @@ -0,0 +1,6 @@ +coverage +coveralls +django-nose +django-dynamic-fixture +mock +psycopg2 diff --git a/setup.py b/setup.py index c44981d..8d6276c 100644 --- a/setup.py +++ b/setup.py @@ -29,6 +29,7 @@ def get_version(): packages=find_packages(), classifiers=[ 'Programming Language :: Python', + 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Intended Audience :: Developers', diff --git a/smart_manager/docs/release_notes.rst b/smart_manager/docs/release_notes.rst index 713fce1..bb5e7a5 100644 --- a/smart_manager/docs/release_notes.rst +++ b/smart_manager/docs/release_notes.rst @@ -1,6 +1,10 @@ Release Notes ============= +v1.1.0 +------ +* Tox + v1.0.0 ------ * Remove python 2.7 support diff --git a/smart_manager/version.py b/smart_manager/version.py index 1f356cc..1a72d32 100644 --- a/smart_manager/version.py +++ b/smart_manager/version.py @@ -1 +1 @@ -__version__ = '1.0.0' +__version__ = '1.1.0' diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..2019bb5 --- /dev/null +++ b/tox.ini @@ -0,0 +1,28 @@ +[tox] +envlist = + flake8 + py{27,34,35,36}-django111 + py{34,35,36}-django20 + py{35,36}-djangomaster + +[testenv] +setenv = + DB = postgres +deps = + django111: Django>=1.11,<2.0 + django20: Django>=2.0,<2.1 + djangomaster: https://github.com/django/django/archive/master.tar.gz + -rrequirements/requirements-testing.txt +commands = + coverage run setup.py test + coverage report --fail-under=100 + +[testenv:flake8] +deps = flake8 +commands = flake8 smart_manager + +[travis:env] +DJANGO = + 1.11: django111 + 2.0: django20 + master: djangomaster