forked from mdn/kuma
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
70 lines (63 loc) · 1.93 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
[tox]
envlist = py27, flake8, docs, dennis, docker, stylelint
skipsdist = True
[testenv:py27]
whitelist_externals = make
deps =
-rrequirements/dev.txt
commands =
make compilejsi18n collectstatic clean
py.test --no-migrations --cov=kuma kuma
passenv =
DATABASE_URL
DJANGO_SETTINGS_MODULE
PIPELINE_*
[testenv:flake8]
basepython = python2.7
deps = flake8
commands = flake8 kuma
[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
docker-compose
git
setenv =
COMPOSE_FILE = docker-compose.yml:docker-compose.test.yml
COMPOSE_PROJECT_NAME = localetox
GIT_PAGER = cat
# Test that locales are refreshed w/o error,
# then display diff only if messages changed
commands =
docker-compose run noext make localerefresh
git diff -G "^msgid " locale/templates/LC_MESSAGES
[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 --build mysql # Build, 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 compilejsi18n collectstatic
docker-compose exec web ./manage.py migrate
docker-compose exec -T web make test
docker-compose stop # Useful for local development
[testenv:stylelint]
whitelist_externals =
npm
stylelint
commands =
npm install -g [email protected]
stylelint "kuma/static/styles/**/*.scss"
[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
ignore = E501,E731,F405