-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
98 lines (90 loc) · 2.42 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
[tox]
envlist = pytest, flake8, docs, locales, docker, assetlint
skipsdist = True
[testenv:pytest]
whitelist_externals = make
deps =
-rrequirements/dev.txt
commands =
make localecompile build-static clean
pytest --cov=kuma kuma
codecov -e TOXENV
passenv =
DATABASE_URL
DJANGO_SETTINGS_MODULE
PIPELINE_*
TOXENV
CI
TRAVIS
TRAVIS_*
CODECOV_*
[testenv:pytest3]
basepython = python3.6
whitelist_externals = make
deps =
-rrequirements/dev.txt
commands =
make localecompile build-static clean
pytest --cov=kuma --maxfail=10 kuma
passenv =
DATABASE_URL
DJANGO_SETTINGS_MODULE
PIPELINE_*
[testenv:flake8]
basepython = python2.7
deps = -rrequirements/dev.txt
commands = make lint
whitelist_externals = make
[testenv:docs]
basepython = python2.7
deps = -rrequirements/docs.txt
commands = sphinx-build -b html -d {envtmpdir}/doctrees docs {envtmpdir}/html
[testenv:locales]
whitelist_externals =
cat
make
git
deps = -rrequirements/dev.txt
changedir = locale
setenv =
GIT_PAGER = cat
# Test that locales are refreshed w/o error,
# then display diff only if messages changed
commands =
make -C .. localerefresh
git diff -G "^msgid " templates/LC_MESSAGES
passenv =
DATABASE_URL
DJANGO_SETTINGS_MODULE
PIPELINE_*
[testenv:docker]
whitelist_externals = docker-compose
setenv =
COMPOSE_FILE = docker-compose.yml:scripts/docker-compose.travis.yml
COMPOSE_PROJECT_NAME = kumatox
passenv = UID
commands =
docker-compose up -d mysql # Init DB (can be slow)
docker-compose build web # Rebuild w/ new reqs, Dockerfile-base
docker-compose up -d # Startup remaining services
docker-compose exec -T web make localecompile build-static clean
docker-compose exec web ./manage.py migrate
docker-compose exec -T web make test
docker-compose stop # Useful for local development
[testenv:assetlint]
whitelist_externals =
npm
commands =
npm run eslint
npm run stylelint
[flake8]
exclude = **/migrations/**,.tox,*.egg,vendor
# E501 - line too long (82 > 79 characters)
# E731 - do not assign a lambda expression, use a def
# F405 - name may be undefined, or defined from star imports: module
# W504 - line break after binary operator
# conflicts with W503 (line break before binary operator)
ignore = E501,E731,F405,W504
# flake8-import-order settings
import-order-style=edited
application-import-names=kuma,pages,utils