forked from translate/pootle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
60 lines (60 loc) · 2.49 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
# https://travis-ci.org/#!/translate/pootle
sudo: false
language: python
env:
- TOXENV=py27-django110-sqlite PYTHONPATH=$HOME/virtualenv/python2.7.9/lib/python2.7/site-packages TOX_TESTENV_PASSENV="PYTHONPATH"
- TOXENV=py27-django110-mysql PYTHONPATH=$HOME/virtualenv/python2.7.9/lib/python2.7/site-packages TOX_TESTENV_PASSENV="PYTHONPATH"
- TOXENV=py27-django110-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/ $HOME/py-workaround/
install:
- if [[ ( "$TRAVIS_BRANCH" == "master" || "$TRAVIS_BRANCH" == "stable/*" ) && "$TRAVIS_PULL_REQUEST" == "false" ]]; then upgrade="--upgrade"; fi;
pip install 'setuptools>=18.5';
pip install $upgrade --process-dependency-links -e .[travis]
# 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
before_script:
- mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root mysql
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
- pyclean $HOME/virtualenv/python2.7.9/lib/python2.7/site-packages/
- cp -a $HOME/py-workaround/* $HOME/virtualenv/python2.7.9/lib/python2.7/site-packages/
# 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