This repository has been archived by the owner on Jun 19, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
tox.ini
87 lines (81 loc) · 2.96 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
# Tox runner configuration
#
# The following optional environment variables can change behaviour. See the
# comments where they are used for more information.
#
# - TOXINI_ARTEFACT_DIR
# - TOXINI_FLAKE8_VERSION
# - TOXINI_WORK_DIR
#
[tox]
# Envs which should be run by default.
envlist=flake8,doc,py36
# Allow overriding toxworkdir via environment variable
toxworkdir={env:TOXINI_WORK_DIR:{toxinidir}/.tox}
# We do not actually ship a setup.py file which is used by our deployment.
# Django projects instead prefer to add the project directories to the Python
# path. (Or, with the current working directory being the project.) The
# skipsdist option tells tox it is OK to not run "setup.py install" for our
# project.
skipsdist=True
# The "_vars" section is ignored by tox but we place some useful shared
# variables in it to avoid needless repetition.
[_vars]
# Where to write build artefacts. We default to the "build" directory in the
# tox.ini file's directory. Override with the TOXINI_ARTEFACT_DIR environment
# variable.
build_root={env:TOXINI_ARTEFACT_DIR:{toxinidir}/build}
[testenv]
# Additional dependencies
deps=
-rrequirements.txt
coverage
# Which environment variables should be passed into the environment.
passenv=
# Django configuration.
DJANGO_*
# Allow people to override the coverage report location should they so wish.
COVERAGE_FILE
# Specify the default environment. Note that tox will *always* use the testsuite
# settings unless overridden by TOX_DJANGO_SETTINGS_MODULE. Just setting
# DJANGO_SETTINGS_MODULE will not override it.
setenv=
DJANGO_SETTINGS_MODULE={env:TOX_DJANGO_SETTINGS_MODULE:iarbackend.settings.tox}
DJANGO_SECRET_KEY=ex561uglj%!8oh*umt3-@2-4yj*&dc8cznob*vmb0!9bryoc-$
DJANGO_DB_ENGINE={env:DJANGO_DB_ENGINE:django.db.backends.sqlite3}
DJANGO_DB_NAME={env:DJANGO_DB_NAME:{envtmpdir}/testsuite-db.sqlite3}
TOX_STATIC_ROOT={[_vars]build_root}/static
# How to run the test suite. Note that arguments passed to tox are passed on to
# the test command.
commands=
coverage run --debug=config --source={toxinidir} manage.py test {posargs}
coverage html --directory {[_vars]build_root}/htmlcov/
coverage report
# Build documentation
[testenv:doc]
basepython=python3.6
deps=
-rrequirements.txt
-rdoc/requirements.txt
commands=sphinx-build -a -v -b html doc/ {[_vars]build_root}/doc/
# Check for PEP8 violations
[testenv:flake8]
basepython=python3.6
deps=
-rrequirements.txt
# We specify a specific version of flake8 to avoid introducing "false"
# regressions when new checks are introduced. The version of flake8 used may
# be overridden via the TOXINI_FLAKE8_VERSION environment variable.
flake8=={env:TOXINI_FLAKE8_VERSION:3.5.0}
commands=
flake8 .
# Collect static files
[testenv:collectstatic]
basepython=python3.6
commands=
python manage.py collectstatic {posargs:--clear --noinput}
# Make migrations
[testenv:makemigrations]
basepython=python3.6
commands=
python manage.py makemigrations {posargs}