-
Notifications
You must be signed in to change notification settings - Fork 15
/
tox.ini
47 lines (44 loc) · 1.37 KB
/
tox.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
[tox]
envlist=py3, docs, report
skip_install=true
skipsdist=true
[testenv:py3]
# Deps needed for code testing (actual deps are in setup.py)
deps=
coverage
coveralls
pycodestyle
pylint
commands=
## Comands fail 'fast' so later commands won't run if any earlier one fails
# Install 'local' pyramid_jsonapi
pip install -e .
# Install deps for test_project
pip install -e test_project
pycodestyle --ignore=E402,E501,W503,W504,E731 pyramid_jsonapi
pylint --errors-only --rcfile=.pylintrc pyramid_jsonapi
# Call unittest from coverage (add --buffer to 'discover' to hide output from tests that pass)
coverage run --source=pyramid_jsonapi -m unittest --verbose -f {posargs:pyramid_jsonapi.unit_tests test_project.tests}
# Generate coverage report
#coverage report -m
# Try to push coverage data to coveralls (ignore exit code as will fail if not on travis)
- coveralls
[testenv:report]
deps=
coverage
commands=
coverage report -m
[testenv:docs]
# Deps needed for code testing (actual deps are in setup.py)
deps=
sphinx
sphinx-rtd-theme
travis-sphinx
# Pass in TRAVIS tokens and GH_TOKEN for travis-sphinx
passenv=TRAVIS TRAVIS_* GH_TOKEN
commands=
pip install -e .
# Build the sphinx docs (will push to gh-pages if tox is run by travis)
docs: /bin/bash docs/sphinx.sh
whitelist_externals=
/bin/bash