Skip to content

Commit

Permalink
Configure tox
Browse files Browse the repository at this point in the history
  • Loading branch information
gunthercox committed Jul 25, 2017
1 parent beeca00 commit 94903b1
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 20 deletions.
22 changes: 4 additions & 18 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,32 +9,18 @@ os:
- linux
- windows

env:
- DJANGO_VERSION=1.8
- DJANGO_VERSION=1.9
- DJANGO_VERSION=1.10
services:
- mongodb

install:
- pip install .
- pip install -r dev-requirements.txt
- pip install -r requirements.txt
- pip install -q Django==$DJANGO_VERSION
- pip install tox coveralls codeclimate-test-reporter

addons:
code_climate:
repo_token: 3ec30a156224df0f59620967241d9659086e918fd824f4f69b8ce7b55b5a590f

services:
- mongodb

script:
- flake8
- python runtests.py
- python examples/django_app/manage.py test examples/django_app/
- nosetests --with-coverage --cover-package=chatterbot
- nosetests examples
- sphinx-build -nW -b html ./docs/ ./build/
- python tests/benchmarks.py
- tox

after_success:
- coveralls
3 changes: 2 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ include LICENSE
include requirements.txt

recursive-exclude * __pycache__
recursive-exclude * *.py[co~]
recursive-exclude * *.py[co~]
recursive-exclude * .*
1 change: 0 additions & 1 deletion dev-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
codeclimate-test-reporter
coveralls
factory-boy>=2.8,<2.9
flake8
Expand Down
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@ max_line_length = 175
exclude =
.eggs,
.git,
.tox,
build,
48 changes: 48 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
[tox]
skipsdist = True

[testenv]
passenv = DJANGO_SETTINGS_MODULE PYTHONPATH HOME DISPLAY
setenv = PYTHONDONTWRITEBYTECODE=1
deps =
django18: Django>=1.8,<1.9
django19: Django>=1.9,<1.10
django110: Django>=1.10<1.11
-rrequirements.txt
-rdev-requirements.txt

[testenv:test]
commands =
nosetests --with-coverage --cover-package=chatterbot
nosetests examples

[testenv:django18]
commands =
python setup.py develop --no-deps
python runtests.py
python examples/django_app/manage.py test examples/django_app/

[testenv:django19]
commands =
python setup.py develop --no-deps
python runtests.py
python examples/django_app/manage.py test examples/django_app/

[testenv:django110]
commands =
python setup.py develop --no-deps
python runtests.py
python examples/django_app/manage.py test examples/django_app/

[testenv:benchmark]
deps = -rrequirements.txt
commands =
python setup.py develop --no-deps
python tests/benchmarks.py

[testenv:lint]
deps = flake8
commands = flake8

[testenv:docs]
commands = sphinx-build -nW -b html ./docs/ {envtmpdir}/build/

0 comments on commit 94903b1

Please sign in to comment.