-
Notifications
You must be signed in to change notification settings - Fork 131
/
.travis.yml
67 lines (62 loc) · 2.48 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
# Default (xenial) has antique openssl that cryptography no longer supports.
dist: bionic
language: python
python:
- "2.7"
- "3.6"
matrix:
include:
# Test against the oldest version of Twisted that we claim to support.
# Also test against Riak 1.4.12.
# This is a separate matrix inclusion to avoid spawning unnecessary builds.
# Although there are two different things we're testing against here, they
# are orthogonal and any failures should be easily attributable to either
# Twisted version or Riak version without adding an additional build job.
- python: "2.7"
env: TWISTED_VERSION="Twisted==16.4.0" RIAK_VERSION="1.4.12"
# Test on pypy without coverage, because it's unnecessary and very slow.
# The exact versions of pypy available seem to change over time, but pypy2
# gets us an older version. Hopefully pypy2.7-7.3.1 will continue working
# for a while.
- python: "pypy2.7-7.3.1"
env: NO_COVERAGE=1
- python: "3.6"
env: RUN_TESTS="false"
allow_failures:
- python: "3.6"
- env: RUN_TESTS="true"
cache:
directories:
- $HOME/.cache/pip
- $HOME/downloads
services:
- redis-server
before_install:
# Default values for our build envvars.
- export RIAK_VERSION="${RIAK_VERSION-2.1.1}"
- export TWISTED_VERSION="${TWISTED_VERSION-Twisted}"
- export NODEJS_VERSION="${NODEJS_VERSION-lts/carbon}"
- export RUN_TESTS="${RUN_TESTS-true}"
# Set up an appropriate version of Riak.
- utils/setup_travis_riak.sh "${RIAK_VERSION}"
# Set up an appropriate version of nodejs.
- nvm install $NODEJS_VERSION
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}"
- "pip install -r requirements.pip"
- "pip install coveralls"
before_script:
# Dump the riak console log in case in contains anything we need to see.
- echo ' vvv riak console log vvv'
- cat $HOME/riak/log/console.log
- echo ' ^^^ riak console log ^^^'
# 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:
- if [ -z "$NO_COVERAGE" ]; then COVERAGE_CMD="coverage run --source=vumi"; else COVERAGE_CMD=""; fi
- if [ "$RUN_TESTS" == "true" ]; then VUMI_TEST_ASSERT_CLOSED=true VUMI_TEST_TIMEOUT=20 VUMITEST_REDIS_DB=1 VUMI_TEST_NODE_PATH="$(which node)" $COVERAGE_CMD `which trial` vumi; fi
after_success:
- if [ -z "$NO_COVERAGE" ]; then coveralls; fi