django-ddp/tox.ini

158 lines
4.2 KiB
INI

# Tox (http://tox.testrun.org/) is a tool for running tests
# in multiple virtualenvs. This configuration file will run the
# test suite on all supported python versions. To use it, "pip install tox"
# and then run "tox" from this directory.
[tox]
# require tox 2.1.1 or later
minversion=2.1.1
# list of environments to run by default
envlist =
lint
clean
py33-django{1.8}
{py27,py34,py35,pypy,pypy3}-django{1.8,1.9}
report
[testenv]
# virtualenv only installs setuptools==0.18.2 but we need 0.18.5:
# - https://github.com/pypa/virtualenv/issues/807
# - https://github.com/pypa/virtualenv/issues/801
# - https://github.com/pypa/virtualenv/issues/717
# - https://github.com/pypa/virtualenv/issues/781
# - https://github.com/pypa/virtualenv/issues/580
# - https://github.com/pypa/virtualenv/issues/563
# - https://github.com/pypa/virtualenv/issues/491
# wheel 0.25.0 needed for Python 3.5:
# - https://bitbucket.org/pypa/wheel/issues/146/wheel-building-fails-on-cpython-350b3
install_command=sh -c 'pip install -U "setuptools>=18.5" "wheel>=0.25.0" "pip>=7.1.2" && pip install "$@" && sync' sh {opts} {packages}
whitelist_externals=sh
# force clean environment each time
recreate=True
# build sdist from setup.py and install from that (validate setup.py)
usedevelop=False
# list of environment variables passed through to commands
passenv=
; https://help.ubuntu.com/community/EnvironmentVariables#Other_environment_variables
USER
LOGNAME
HOME
TERM
TERMCAP
; https://help.ubuntu.com/community/EnvironmentVariables#Graphical_desktop-related_variables
DISPLAY
XDG_CACHE_HOME
C_INCLUDE_PATH
CFLAGS
; https://wiki.jenkins-ci.org/display/JENKINS/Building+a+software+project
BUILD_NUMBER
BUILD_ID
BUILD_URL
NODE_NAME
JOB_NAME
BUILD_TAG
JENKINS_URL
EXECUTOR_NUMBER
JAVA_HOME
WORKSPACE
GIT_COMMIT
GIT_URL
GIT_BRANCH
; http://www.postgresql.org/docs/current/static/libpq-envars.html
PGHOST
PGHOSTADDR
PGPORT
PGDATABASE
PGUSER
PGPASSWORD
PGPASSFILE
PGSERVICE
PGSERVICEFILE
PGREALM
PGOPTIONS
PGAPPNAME
PGSSLMODE
PGREQUIRESSL
PGSSLCOMPRESSION
PGSSLCERT
PGSSLKEY
PGSSLROOTCERT
PGSSLCRL
PGREQUIREPEER
PGKRBSRVNAME
PGSSLLIB
PGCONNECT_TIMEOUT
PGCLIENTENCODING
PGDATESTYLE
PGTZ
PGGEQO
PGSYSCONFDIR
PGLOCALEDIR
# `pip install -rrequierements.txt` <-- tox doesn't understand PEP-0496 Environment Markers.
# pypy coverage fails with --concurrency set to `gevent`
# pypy install gevent fails building wheel
commands =
{py27,py33,py34,py35}: pip install -rrequirements.txt
{pypy,pypy3}: pip install --no-binary gevent -rrequirements.txt
{py27,py33,py34,py35}: coverage run --append --concurrency=gevent --source=dddp setup.py test
{pypy,pypy3}: coverage run --append --source=dddp setup.py test
deps =
#-rrequirements.txt
django1.8: Django>=1.8,<1.9
django1.9: Django>=1.9,<1.10
coverage
[testenv:dist]
install_command=sh -c 'pip install -U "setuptools>=18.5" "wheel>=0.25.0" "pip>=7.1.2" && pip install "$@" && sync' sh {opts} {packages}
whitelist_externals=sh
commands =
check-manifest --ignore "dddp/test/build*,dddp/test/meteor_todos/.meteor/local*"
{envpython} setup.py --no-user-cfg sdist --dist-dir={toxinidir}/dist/
{envpython} setup.py --no-user-cfg bdist_wheel --dist-dir={toxinidir}/dist/
sh -c "cd docs && sphinx-build -b html -d _build/doctrees -D latex_paper_size=a4 . _build/html"
usedevelop=True
deps =
-rrequirements.txt
-rrequirements-dev.txt
check-manifest
wheel
[testenv:clean]
skip_install=True
deps=coverage
commands=
coverage erase
[testenv:report]
skip_install=True
deps=coverage
commands=
coverage report
coverage html
[testenv:lint]
usedevelop=True
commands=
pip install -rrequirements.txt
prospector --doc-warnings --zero-exit {toxinidir}/dddp/
deps =
prospector==0.10.2
pylint==1.4.5