-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
60 lines (54 loc) · 1.43 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
[tox]
envlist =
py{37,38}-django{22,30,31,32}
[pytest]
django_find_project = false
DJANGO_SETTINGS_MODULE=tests.settings
[testenv]
description = Run tests in {envname} environment
setenv =
PYTHONPATH = {toxinidir}:{toxinidir}/tests:{env:PYTHONPATH:}
commands = {posargs:pytest}
deps =
pytest>=5.2.0
pytest-django
django22: Django>=2.2,<3.0
django30: Django>=3.0,<3.1
django31: Django>=3.1,<3.2
django32: Django>=3.2b1,<4.0
[testenv:clean]
description = Clean all build and test artifacts
skipsdist = true
skip_install = true
deps =
whitelist_externals =
find
rm
commands =
find {toxinidir} -type f -name "*.pyc" -delete
find {toxinidir} -type d -name "__pycache__" -delete
rm -f {toxinidir}/tests/db.sqlite {toxworkdir} {toxinidir}/.pytest_cache {toxinidir}/build
[testenv:pep8]
description = Run PEP8 pycodestyle (flake8) against the src/statictext/ package directory
skipsdist = true
skip_install = true
basepython = python3.7
deps = flake8
commands = flake8 src/statictext tests
[testenv:coverage]
description = Run test coverage and display results
basepython = python3.7
deps =
{[testenv]deps}
Django>=2.2,<3.0
coverage
pytest-cov
whitelist_externals =
echo
commands =
pytest --cov-config .coveragerc --cov-report html --cov-report term --cov=statictext
echo HTML coverage report: {toxinidir}/build/coverage/index.html
[gh-actions]
python =
3.7: py37
3.8: py38