Skip to content

Commit

Permalink
add tox.ini, use tox with travis
Browse files Browse the repository at this point in the history
  • Loading branch information
pawl committed Jan 30, 2017
1 parent 1cc9021 commit bc98ff7
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -26,3 +26,4 @@ examples/appengine/lib
env
*.egg
.eggs
.tox/
8 changes: 4 additions & 4 deletions .travis.yml
Expand Up @@ -6,6 +6,7 @@ python:
- "3.3"
- "3.4"
- "3.5"
- "3.6"

env:
- WTFORMS_VERSION=1
Expand All @@ -17,17 +18,16 @@ addons:
services:
- postgresql
- mongodb

before_script:
- psql -U postgres -c 'CREATE DATABASE flask_admin_test;'
- psql -U postgres -c 'CREATE EXTENSION postgis;' flask_admin_test
- psql -U postgres -c 'CREATE EXTENSION hstore;' flask_admin_test

install:
- pip install "wtforms<$WTFORMS_VERSION.99"
- pip install -r requirements-dev.txt
- pip install tox

script: nosetests flask_admin/tests --with-coverage --cover-erase --cover-inclusive
script: tox -e py-WTForms$WTFORMS_VERSION

after_success:
- coveralls
2 changes: 2 additions & 0 deletions README.rst
Expand Up @@ -95,6 +95,8 @@ For all the tests to pass successfully, you'll need Postgres & MongoDB to be run
CREATE DATABASE flask_admin_test;
CREATE EXTENSION postgis;

You can also run the tests on multiple environments using *tox*.

3rd Party Stuff
---------------

Expand Down
1 change: 0 additions & 1 deletion requirements-dev.txt
@@ -1,5 +1,4 @@
Flask>=0.7
wtforms
Flask-SQLAlchemy>=0.15
peewee
wtf-peewee
Expand Down
13 changes: 13 additions & 0 deletions tox.ini
@@ -0,0 +1,13 @@
[tox]
envlist = py{26,27,33,34,35,36}-WTForms{1,2}
skipsdist = true
skip_missing_interpreters = true

[testenv]
usedevelop = true
deps =
WTForms1: WTForms==1.0.5
WTForms2: WTForms>=2.0
-r{toxinidir}/requirements-dev.txt
commands =
nosetests flask_admin/tests --with-coverage --cover-erase --cover-inclusive

0 comments on commit bc98ff7

Please sign in to comment.