forked from pretalx/pretalx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
150 lines (128 loc) · 3.48 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
[tox]
envlist =
dev
lint
tests-{mysql,postgres,sqlite}-{codecov}
installation
docs, docs-linkcheck, docs-autobuild
skip_missing_interpreters = true
setupdir = src
[testenv]
basepython = python3.6
usedevelop = True
envdir = {toxinidir}/.env
recreate = false
deps =
-e src
tests: beautifulsoup4
tests: lxml
tests: pytest==3.9.3
tests: pytest-cov
tests: pytest-django
tests: pytest-mock
tests: pytest-sugar
tests: pytest-xdist
mysql: mysqlclient
postgres: psycopg2-binary
codecov: codecov
codecov: coverage
dev: django-debug-toolbar
dev: django-extensions
dev: ipython
lint: isort
lint: pylama
docs: potypo
docs: releases
docs: sphinx
docs: sphinxcontrib-httpdomain
docs: sphinxcontrib-spelling
autobuild: sphinx-autobuild
changedir = src
passenv =
# See https://github.com/codecov/codecov-python/blob/5b9d539a6a09bc84501b381b563956295478651a/README.md#using-tox
tests-*: TOXENV
tests-*: CI
tests-*: TRAVIS TRAVIS_*
setenv =
PIP_DISABLE_PIP_VERSION_CHECK=1
VIRTUALENV_NO_DOWNLOAD=1
[testenv:dev]
description = Run development commands. By default the development server is started, but you can call other commands: tox -e dev manage.py makemigrations
commands = python {posargs:-m pretalx runserver}
setenv =
PYTHONPATH={toxinidir}
PATH={envdir}/bin:{env:PATH}
ignore_outcome = True
[testenv:lint]
description = Check the code style of the project and print outdated requirements
commands =
pip list -o --format=columns
isort -rc -c {toxinidir}/src
pylama {toxinidir}/src
[testenv:docs]
description = Build the documentation
commands =
make html
make spelling
changedir = doc
whitelist_externals = /usr/bin/make
[testenv:docs-linkcheck]
description = Check that all links in docs are working.
commands =
make linkcheck
ignore_outcome = True
changedir = doc
whitelist_externals = /usr/bin/make
[testenv:docs-autobuild]
description = Run a sphinx server that automatically rebuilds for changes.
whitelist_externals = /usr/bin/make
commands =
sphinx-autobuild . _build/html -p 8081
ignore_outcome = True
changedir = doc
[testenv:installation]
description = Check that startup of pretalx works as intended.
commands =
python -m pretalx check
python -m pretalx migrate
python -m pretalx rebuild --clear
[testenv:tests]
commands = pytest {posargs:tests/}
[testenv:tests-sqlite]
commands =
python -m pretalx rebuild
pytest {posargs:tests/}
setenv =
PRETALX_DATA_DIR={toxinidir}/src/data/test-sqlite
[testenv:tests-sqlite-codecov]
description = Build a coverage report and upload it to codecov.io
commands =
python -m pretalx rebuild
pytest --cov=pretalx {posargs:tests/}
codecov
setenv =
PRETALX_DATA_DIR={toxinidir}/src/data/test-sqlite
[testenv:tests-postgres]
commands =
python -m pretalx rebuild
pytest --cov=pretalx {posargs:tests/}
setenv =
PRETALX_DATA_DIR={toxinidir}/src/data/test-postgres
PRETALX_DB_TYPE=postgresql_psycopg2
PRETALX_DB_NAME=travis_ci_test
PRETALX_DB_USER=postgres
PRETALX_DB_PASSWORD=
PRETALX_DB_HOST=localhost
whitelist_externals = /usr/bin/postgres
[testenv:tests-mysql]
commands =
python -m pretalx rebuild
pytest --cov=pretalx {posargs:tests/}
setenv =
PRETALX_DATA_DIR={toxinidir}/src/data/test-mysql
PRETALX_DB_TYPE=mysql
PRETALX_DB_NAME=pretalx
PRETALX_DB_USER=root
PRETALX_DB_PASSWORD=
PRETALX_DB_HOST=127.0.0.1
PRETALX_DB_PORT=3306