This repository has been archived by the owner on Mar 6, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
tox.ini
73 lines (69 loc) · 2.31 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
# 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. This will execute a matrix of tests
envlist =
py{27,34,35,36}-django111
py{34,35,36, 37}-django20
py{35,36, 37}-django21
coverage
flake8
# Allow overriding toxworkdir via environment variable
toxworkdir={env:TOXINI_WORK_DIR:{toxinidir}/.tox}
# Do not attempt to create .egg-info directories in the application root as it
# is mounted as a read-only volume.
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]
setenv=
# Override the coverage dtaa file location since the application root is
# mounted read-only.
COVERAGE_FILE={env:TOXINI_COVERAGE_FILE:{toxinidir}/.coverage}
# Additional dependencies
deps=
coverage
django111: Django>=1.11,<2.0
django20: Django>=2.0,<2.1
django21: Django>=2.1,<2.2
# Specify the default environment.
commands=
coverage run --source={toxinidir} ./runtests.py
# Check for PEP8 violations
[testenv:flake8]
basepython=python3
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.6.0}
commands=
flake8 --version
flake8 .
# Check for PEP8 violations
[testenv:coverage]
basepython=python3
deps=
coverage
django
# 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.
commands=
coverage run --source={toxinidir} ./runtests.py
coverage html --directory {[_vars]build_root}/htmlcov/
coverage report
coverage xml -o {env:COVERAGE_XML_FILE:{[_vars]build_root}/coverage.xml}