forked from translate/pootle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
77 lines (75 loc) · 2.36 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
[tox]
envlist = py27-django110-{sqlite,mysql,postgres},project
basepython = python
usedevelop = True
skipsdist = True
[testenv]
sitepackages = True
whitelist_externals=
make
psql
mysql
sqlite3
echo
py.test
codecov
pootle
passenv=
CI TRAVIS_BUILD_ID TRAVIS TRAVIS_BRANCH TRAVIS_JOB_NUMBER TRAVIS_PULL_REQUEST TRAVIS_JOB_ID TRAVIS_REPO_SLUG TRAVIS_COMMIT
setenv=
mysql: DATABASE_BACKEND=mysql_innodb
sqlite: DATABASE_BACKEND=sqlite
postgres: DATABASE_BACKEND=postgres
commands=
sqlite: sqlite3 --version
postgres: psql --version
postgres: psql -c 'create database pootle;' -U postgres
mysql: mysql --version
mysql: mysql -e 'create database pootle CHARACTER SET utf8 COLLATE utf8_general_ci;'
mysql: mysql -e "SET GLOBAL wait_timeout = 36000;"
pootle init
make travis-assets
py.test --force-migration --cov-report=term --cov=. -v --duration=25
python {toxinidir}/run_coveralls.py
codecov -e TOXENV
[testenv:project]
whitelist_externals=
make
npm
psql
mysql
bash
pootle
py.test
codecov
setenv=
DATABASE_BACKEND=sqlite
commands=
# Python code linting
make lint-python
# Setup databases
psql -c 'create database pootle;' -U postgres
mysql -e 'create database pootle CHARACTER SET utf8 COLLATE utf8_general_ci;'
mysql -e "SET GLOBAL wait_timeout = 36000;"
# Migrate and initdb for all DBs
bash -c "DATABASE_BACKEND=mysql_innodb python manage.py migrate --noinput --traceback"
bash -c "DATABASE_BACKEND=mysql_innodb python manage.py initdb --no-projects"
bash -c "DATABASE_BACKEND=postgres python manage.py migrate --noinput --traceback"
bash -c "DATABASE_BACKEND=postgres python manage.py initdb --no-projects"
bash -c "DATABASE_BACKEND=sqlite python manage.py migrate --noinput --traceback"
bash -c "DATABASE_BACKEND=sqlite python manage.py makemigrations --noinput --check"
bash -c "DATABASE_BACKEND=sqlite python manage.py initdb --no-projects"
# Other linting
pootle init
make travis-assets
python setup.py sdist
make docs
python setup.py check --restructuredtext --strict
python setup.py build_mo
make lint-js
make lint-css
make lint-docs
make test-js
py.test --cov-report= --cov=. -v -s -k test_debug_timing --debug-tests -
python {toxinidir}/run_coveralls.py
codecov -e TOXENV