FAQ | This is a LIVE service | Changelog

Skip to content
Snippets Groups Projects
Commit fa002850 authored by Dr Abraham Martin's avatar Dr Abraham Martin
Browse files

Add tox configuration

parent 20fb2d08
No related branches found
No related tags found
1 merge request!4Add tox support for matrix testing
[run]
omit=
setup.py
ucamlookup/tests/*
ucamlookup/wsgi.py
.tox/*
ucamlookup/migrations/*
[flake8]
max-line-length=120
exclude = venv,.tox,ibisclient,build/*
......@@ -3,4 +3,7 @@
dist
.DS_Store
django_ucamlookup.egg-info
MANIFEST
\ No newline at end of file
MANIFEST
.tox
build
.coverage
tox.ini 0 → 100644
# 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}
# 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=
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}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment