forked from IJtLJZ8Rm4Yr/ymir-backend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
45 lines (39 loc) · 1.99 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
# Tox (http://tox.testrun.org/) is a tool for running tests
# in multiple virtualenvs. This configuration file will run the
# test suite on all supported python versions. To use it, "pip install tox"
# and then run "tox" from this directory.
# use --recreate
[tox]
envlist = py38
skipsdist = True
[testenv]
setenv =
PYTHONPATH = {toxinidir}/src/pymir-app:{toxinidir}/src/pymir-viz:{toxinidir}/src/pymir-controller
PIP_DEFAULT_TIMEOUT = 100
FIRST_ADMIN = [email protected]
FIRST_ADMIN_PASSWORD = fakepasswd
USE_200_EVERYWHERE = False
SHARED_DATA_DIR = {toxinidir}/src/pymir-app/tmp
EMAIL_TEMPLATES_DIR = {toxinidir}/src/pymir-app/app/email-templates/build
deps =
-rrequirements.txt
-rrequirements-dev.txt
commands = mkdir -p {toxinidir}/src/pymir-app/tmp
cp -rf {toxinidir}/src/pymir-app/alembic {toxinidir}/alembic
python {toxinidir}/src/pymir-app/app/backend_pre_start.py
alembic -c {toxinidir}/src/pymir-app/alembic.ini -x sqlite=True upgrade head
python {toxinidir}/src/pymir-app/app/initial_data.py
cp -rf {toxinidir}/src/pymir-app/static {toxinidir}/static
coverage erase
pytest --cov={toxinidir}/src/pymir-app/app --cov-config={toxinidir}/src/pymir-app/.coveragerc -sx {toxinidir}/src/pymir-app/tests
rm -r app.db {toxinidir}/src/pymir-app/tmp
rm -rf {toxinidir}/static
rm -rf {toxinidir}/alembic
coverage erase
pytest -v -xs --durations=0 -n=4 --cov={toxinidir}/src/pymir-controller/controller/invoker \
--cov={toxinidir}/src/pymir-controller/controller/label_model --cov={toxinidir}/src/pymir-controller/controller/utils \
-sx {toxinidir}/src/pymir-controller/tests
coverage erase
pytest --cov={toxinidir}/src/pymir-viz/src --cov-config={toxinidir}/src/pymir-viz/.coveragerc -sx {toxinidir}/src/pymir-viz/tests
flake8 src/pymir-app/app src/pymir-viz/src src/pymir-controller/controller
mypy