forked from serge-community/zing
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
65 lines (65 loc) · 2.9 KB
/
.travis.yml
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
# https://travis-ci.org/#!/translate/pootle
sudo: false
language: python
env:
- TOXENV=py27-django19-sqlite PYTHONPATH=$HOME/virtualenv/python2.7.9/lib/python2.7/site-packages TOX_TESTENV_PASSENV="PYTHONPATH"
- TOXENV=py27-django19-mysql PYTHONPATH=$HOME/virtualenv/python2.7.9/lib/python2.7/site-packages TOX_TESTENV_PASSENV="PYTHONPATH"
- TOXENV=py27-django19-postgres PYTHONPATH=$HOME/virtualenv/python2.7.9/lib/python2.7/site-packages TOX_TESTENV_PASSENV="PYTHONPATH"
# Meta
- TOXENV=project PYTHONPATH=$HOME/virtualenv/python2.7.9/lib/python2.7/site-packages TOX_TESTENV_PASSENV="PYTHONPATH"
cache:
directories:
- pootle/static/js/node_modules
- pootle/assets
- $HOME/virtualenv/python2.7.9/bin
- $HOME/virtualenv/python2.7.9/lib
- $HOME/virtualenv/python2.7/bin
before_install:
- cp -a $HOME/virtualenv/python2.7.9/lib/python2.7/site-packages/py/ $HOME/py-workaround/
- cp -a $HOME/virtualenv/python2.7.9/lib/python2.7/site-packages/_pytest/ $HOME/_pytest-workaround/
- cp -a $HOME/virtualenv/python2.7.9/lib/python2.7/site-packages/pytest.pyc $HOME/pytest_pyc-workaround
install:
- if [[ ( "$TRAVIS_BRANCH" == "master" || "$TRAVIS_BRANCH" == "stable/*" ) && "$TRAVIS_PULL_REQUEST" == "false" ]]; then upgrade="--upgrade"; fi;
pip install $upgrade
-r requirements/base.txt
-r requirements/travis.txt
-e .
# http://entulho.fiatjaf.alhur.es/guias/how-to-use-node-along-with-other-language-on-travis-ci/
- source $HOME/.nvm/nvm.sh
- nvm install stable
- nvm use stable
script:
- tox -e $TOXENV
notifications:
email:
on_failure: always
on_success: change
irc:
on_failure: always
on_success: change
channels:
- "chat.freenode.net#pootle-dev"
use_notice: true
skip_join: true
template:
- "(%{branch} @ %{commit} : %{author}): %{message} %{build_url}"
webhooks:
urls:
- https://webhooks.gitter.im/e/a6e983c90a9617548a6d
on_success: change
on_failure: always
on_start: never
before_cache:
# travis is so dumb - https://github.com/travis-ci/travis-ci/issues/4873
- pip uninstall py pytest -y
- pip install py==1.4.26 pytest==2.6.4
- rm -rf $HOME/virtualenv/python2.7.9/lib/python2.7/site-packages/py/
- rm -rf $HOME/virtualenv/python2.7.9/lib/python2.7/site-packages/_pytest/
- cp -a $HOME/py-workaround/ $HOME/virtualenv/python2.7.9/lib/python2.7/site-packages/py/
- cp -a $HOME/pytest_pyc-workaround $HOME/virtualenv/python2.7.9/lib/python2.7/site-packages/pytest.pyc
- cp -a $HOME/_pytest-workaround/ $HOME/virtualenv/python2.7.9/lib/python2.7/site-packages/_pytest/
# Force rebuilds by removing cache for 'master' and 'stable/*' builds
- if [[ ( "$TRAVIS_BRANCH" == "master" || "$TRAVIS_BRANCH" == "stable/*" ) && "$TRAVIS_PULL_REQUEST" == "false" ]]; then rm -rf pootle/static/js/node_modules/* pootle/assets/* pootle/assets/.webassets-cache; fi
services:
- redis-server
- elasticsearch