forked from mozilla/pontoon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
65 lines (59 loc) · 2.13 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
sudo: false
language: python
python:
- '2.7'
cache:
bundler: true
# cache the python dirs - this provides a very big speedup
directories:
- node_modules
- $HOME/virtualenv/python2.7.14/bin
- $HOME/virtualenv/python2.7.14/lib
- $HOME/virtualenv/python2.7/bin
before_install:
# make a copy of the python libs before running tests. These are then used to restore
# specifically the "py" and "pytest" packages (including any pyc etc) at the end of the
# test run. This is necessary to prevent cache uploads with no change.
# see here for discussion - https://github.com/travis-ci/travis-ci/issues/4873
# bugzilla bug here: https://bugzilla.mozilla.org/show_bug.cgi?id=1442281
# caches may need to be cleared from time to time https://docs.travis-ci.com/user/caching#Clearing-Caches
- cp -a $HOME/virtualenv/python2.7.14/lib/python2.7/site-packages/ $HOME/py-workaround/
install:
- pip install -U --force pip
- pip install --require-hashes -r requirements.txt
- pip install --require-hashes -r requirements-test.txt
- source $HOME/.nvm/nvm.sh
- nvm install node
- nvm use node
- npm install .
- pushd frontend && npm install && popd
script:
- pylama pontoon
- pylama tests
- ./node_modules/.bin/webpack
- pushd frontend && npm run build && popd
- python manage.py collectstatic -v0 --noinput
- npm test
- pushd frontend && npm test && popd
- py.test --cov-append --cov-report=term --cov=. -v --create-db --migrations
- ./node_modules/.bin/eslint .
- codecov
# Heroku deployment file is valid
- cat app.json | python -m json.tool > /dev/null
addons:
postgresql: "9.4"
apt:
packages:
- language-pack-tr
before_cache:
# workaround for travis/aufs to prevent cache upload if no change
# if real change happens, the cache will still be updated
- pip uninstall py pytest -y
- pip install py==1.4.34 pytest==3.2.3
- pyclean $HOME/virtualenv/python2.7.14/lib/python2.7/site-packages/
- cp -a $HOME/py-workaround/* $HOME/virtualenv/python2.7.14/lib/python2.7/site-packages/
env:
global:
- SECRET_KEY=asdf
- DATABASE_URL=postgres://postgres@localhost/pontoon
- HMAC_KEY=asdf