forked from divio/django-multisite-plus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
78 lines (71 loc) · 1.82 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
[tox]
# Having the .tox directory in the project directory slows down the
# `pip install -e .` step required by `usedevelop = true` considerably.
# By moving it out of the way (~500MB), we trim test execution time by > 80%.
toxworkdir = /tmp/.toxenvs/django-multisite-plus
envlist =
clean,
test-py{38,39,310}-django{32,42},
lint,
manifest,
coverage
isolated_build = true
[testenv]
depends = test: clean
docker = test: postgres
constrain_package_deps = true
deps =
test: pytest
test: pytest-cov
test: pytest-django
django32: django>=3.2,<3.3
django42: django>=4.2,<4.3
basepython =
py38: python3.8
py39: python3.9
py310: python3.10
commands =
test: pytest ./tests {posargs}
setenv =
COVERAGE_FILE = .artifacts/coverage.{env:TOX_ENV_NAME}
DJANGO_SETTINGS_MODULE = testproject.settings
[testenv:manifest]
deps = check-manifest
commands = check-manifest
skip_install = true
[testenv:lint]
deps =
black
isort
flake8
commands =
isort --check-only src/django_multisite_plus
black --check src/django_multisite_plus
flake8 --ignore=E501,E722,E402,W503,E203 src/django_multisite_plus
skip_install = true
[testenv:clean]
deps = coverage[toml]
commands = coverage erase
skip_install = true
[testenv:coverage]
depends = test-py{38,39,310}-django{32,42},clean
deps = coverage[toml]
commands =
coverage combine .artifacts/
coverage html
coverage report
setenv =
COVERAGE_FILE = .artifacts/coverage
skip_install = true
[docker:postgres]
image = postgres:13-alpine
environment =
POSTGRES_HOST_AUTH_METHOD=trust
healthcheck_cmd = psql \
--user=postgres --dbname=postgres \
--host=127.0.0.1 --quiet --no-align --tuples-only \
-1 --command="SELECT 1"
healthcheck_timeout = 1
healthcheck_retries = 30
healthcheck_interval = 1
healthcheck_start_period = 1