forked from RedHatInsights/insights-rbac
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
56 lines (53 loc) · 1.34 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
[tox]
envlist = py36, lint
skipsdist = True
[flake8]
; D106 = Missing docstring in public nested class
; D212 = Multi-line docstring summary should start at the first line
ignore = D106,D212,W503
max-complexity = 10
max-line-length = 120
exclude =
**/migrations/*.py
**/manage.py
**/settings.py
import-order-style = pycharm
application-import-names = rbac, api
[testenv]
passenv = CI TRAVIS TRAVIS_*
setenv =
DATABASE_NAME={env:DATABASE_NAME:rbac_test}
DATABASE_HOST={env:DATABASE_HOST:localhost}
DATABASE_PORT={env:DATABASE_PORT:15432}
DATABASE_USER=rbac_tester
DATABASE_PASSWORD={env:DATABASE_PASSWORD:''}
PGPASSWORD=postgres
TESTING_APPLICATION=app
deps =
pipenv
codecov
commands =
/bin/sh {toxinidir}/scripts/create_test_db_user.sh {env:DATABASE_USER}
pipenv run pip install -U pip
pipenv install --dev --ignore-pipfile
coverage run {toxinidir}/rbac/manage.py test -v 2 {posargs: tests/}
coverage report --show-missing
/bin/sh {toxinidir}/scripts/drop_test_db_user.sh {env:DATABASE_USER}
[testenv:lint]
deps =
flake8
flake8-docstrings
flake8-import-order
flake8-quotes
pipenv
pylint
pylint-plugin-utils
pylint-django
pydocstyle < 4.0.0
setenv =
PYTHONPATH={toxinidir}
commands =
flake8 rbac
pipenv run pip install -U pip
pipenv install --dev --ignore-pipfile
pylint --load-plugins=pylint_django rbac/rbac