forked from praekeltfoundation/vumi-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
65 lines (60 loc) · 2.08 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 # We want container builds.
language: python
python:
- "2.7"
node_js:
- "0.10"
env:
- VUMIGO_TEST_DB=postgres
matrix:
# Some separate matrix inclusions to avoid spawning unnecessary builds.
include:
# Test against Riak 2.1.1.
- python: "2.7"
env: RIAK_VERSION="2.1.1" VUMIGO_TEST_DB=postgres
# Test against Twisted 15.4
- python: "2.7"
env: TWISTED_VERSION="Twisted==15.4"
# Test without Django.
- python: "2.7"
env: VUMIGO_SKIP_DJANGO=1 NO_COVERAGE=1
# Test on pypy. We need to install our own because 2.5.1 is too old.
# Also, we hit an obscure GC bug in pypy<=2.6.0 so we need at least 2.6.1.
- python: "pypy"
env: PYPY_VERSION="4.0.1" VUMIGO_TEST_DB=postgres NO_COVERAGE=1
cache:
directories:
- $HOME/.cache/pip
- $HOME/downloads
services:
- postgresql
- redis-server
before_install:
# If necessary, set up an appropriate version of pypy.
- if [ ! -z "$PYPY_VERSION" ]; then source utils/setup-pypy-travis.sh; fi
- if [ ! -z "$PYPY_VERSION" ]; then python --version 2>&1 | fgrep "PyPy $PYPY_VERSION"; fi
# Set up an appropriate version of Riak.
- export RIAK_VERSION="${RIAK_VERSION-1.4.12}"
- utils/setup_travis_riak.sh "${RIAK_VERSION}"
- export TWISTED_VERSION="${TWISTED_VERSION-Twisted}"
install:
# Travis seems to have pip 6.x, which doesn't build and cache wheels.
- "pip install 'pip>=7.1.0'"
- "pip install ${TWISTED_VERSION}"
- "if [ $VUMIGO_SKIP_DJANGO ]; then pip install -e .; else pip install -r requirements.pip; fi"
- "pip install -r requirements-dev.pip"
- "pip install overalls"
- "npm install"
before_script:
- "if [ ! $VUMIGO_SKIP_DJANGO ]; then utils/setup-test-database.sh; fi"
- "export PYTHONPATH=."
- "pip list"
# To see what version of Riak we're running and check that it's happy.
- $HOME/riak/bin/riak version
- $HOME/riak/bin/riak-admin member-status
script:
- export VUMITEST_REDIS_DB=1 VUMI_TEST_TIMEOUT=10
- ./run-tests.sh
- grunt test
after_success:
- "[ -z $NO_COVERAGE ] && overalls --py --lcov mochacov.lcov --lcov coverage/*/lcov.info"