forked from kobotoolbox/kpi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
67 lines (67 loc) · 1.93 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
66
67
# Don't double-build PR commits. See: http://stackoverflow.com/a/31882307/1877326
branches:
only:
- master
dist: xenial
sudo: required
language: python
python:
- "2.7"
services:
- postgresql
addons:
postgresql: "9.5"
chrome: stable
apt:
packages:
- build-essential
- fontforge
- gettext
- git-core
- libpcre3
- libpcre3-dev
- libpq-dev
cache:
directories:
- $HOME/.pip-download-cache
- node_modules
before_script:
- psql -c 'create database travis_ci_test;' -U postgres
script:
- npm run copy-fonts
- npm run build
- pytest -vv --cov
- npm run test
after_script:
- coverage xml && python-codacy-coverage -r coverage.xml
- coveralls
env:
# All about YAML line breaks: https://stackoverflow.com/a/21699210
- >-
PIP_DOWNLOAD_CACHE=$HOME/.pip-download-cache
DJANGO_DEBUG=False
DJANGO_SECRET_KEY=ZGtvYm90cmF2aXM
DJANGO_SETTINGS_MODULE=kobo.settings.testing
DJANGO_LANGUAGE_CODES="en ar es fr hi ku pl pt zh-hans"
DATABASE_URL="postgres://postgres@localhost:5432/travis_ci_test"
TRAVIS_NODE_VERSION="8"
PATH=$PATH:$HOME/build/kobotoolbox/kpi/node_modules/.bin/
install:
- >-
rm -rf ~/.nvm &&
git clone https://github.com/creationix/nvm.git ~/.nvm &&
(cd ~/.nvm &&
git checkout `git describe --abbrev=0 --tags`) &&
source ~/.nvm/nvm.sh &&
nvm install $TRAVIS_NODE_VERSION
- npm install -g install npm@latest
- npm config set strict-ssl false && npm install --save-dev
- pip install --upgrade 'pip>=8.0' wheel
- pip install pip-tools
- pip-sync dependencies/pip/requirements.txt
- >-
git submodule init &&
git submodule update --remote &&
python manage.py compilemessages
- pip install coverage codacy-coverage python-coveralls pytest-cov pytest-django pytest-env
- pip install pytest==3.10 # Force install this version, has to be at the end