forked from StackStorm/st2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
90 lines (79 loc) · 2.97 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# Used old infrastructure, needed for integration tests:
# http://docs.travis-ci.com/user/workers/standard-infrastructure/
sudo: required
dist: precise
language: python
branches:
only:
- master
- /^v[0-9]+\.[0-9]+$/
env:
global:
- CACHE_NAME=JOB1
matrix:
include:
- env: TASK=ci-unit NODE_INDEX=0 NODE_TOTAL=2
python: 2.7
- env: TASK=ci-unit NODE_INDEX=1 NODE_TOTAL=2
python: 2.7
- env: TASK=ci-integration
python: 2.7
- env: TASK="ci-checks ci-packs-tests"
python: 2.7
- env: TASK="compilepy3 ci-py3-unit" CACHE_NAME=py3
python: 3.6
addons:
apt:
sources:
- mongodb-upstart
- sourceline: 'deb [arch=amd64] http://repo.mongodb.org/apt/ubuntu precise/mongodb-org/3.4 multiverse'
key_url: 'https://www.mongodb.org/static/pgp/server-3.4.asc'
- sourceline: 'ppa:git-core/ppa'
packages:
- mongodb-org-server
- mongodb-org-shell
- git
services:
- mongodb
- rabbitmq
cache:
pip: true
directories:
- virtualenv/
# NOTE: Caching .tox speeds up py3 build for 30-60 seconds, but causes issues when dependencies
# are updated so it's disabled
#- .tox/
before_install:
# Work around for Travis timeout issues, see https://github.com/travis-ci/travis-ci/issues/9112
- sudo apt-get update --option Acquire::Retries=100 --option Acquire::http::Timeout="60"
- pip install --upgrade "pip>=9.0,<9.1"
- sudo pip install --upgrade "virtualenv==15.1.0"
install:
- if [ "${TASK}" = 'compilepy3 ci-py3-unit' ]; then pip install "tox==3.0.0"; else make requirements; fi
- if [ "${TASK}" = 'ci-unit' ] || [ "${TASK}" = 'ci-integration' ]; then pip install codecov; fi
- if [ "${TASK}" = 'ci-unit' ] || [ "${TASK}" = 'ci-integration' ] || [ "${TASK}" = 'compilepy3 ci-py3-unit' ]; then sudo .circle/add-itest-user.sh; fi
# Let's enable rabbitmqadmin
# See https://github.com/messagebus/lapine/wiki/Testing-on-Travis.
before_script:
- git --version
- pip --version
- virtualenv --version
- sudo rabbitmq-plugins enable rabbitmq_management
- sudo wget http://guest:guest@localhost:15672/cli/rabbitmqadmin -O /usr/local/bin/rabbitmqadmin
- sudo chmod +x /usr/local/bin/rabbitmqadmin
- sudo service rabbitmq-server restart
script:
- make ${TASK}
# Don't store cache for target PR branch (typically `master`), because it will be re-used for opened PRs
# See: https://docs.travis-ci.com/user/caching/#Pull-request-builds-and-caches
# Alternative: use strict pip pinning, including git-based pip packages
before_cache:
- if [ ${TRAVIS_PULL_REQUEST} = 'false' ]; then rm -rf virtualenv/; fi
after_success:
- if [ ${TASK} = 'ci-unit' ] || [ ${TASK} = 'ci-integration' ]; then codecov; fi
# https://docs.travis-ci.com/user/notifications/#Webhooks-Delivery-Format
#notifications:
# webhooks:
# #- https://ci-webhooks.stackstorm.net/webhooks/build/events
# # See: webhook.site/#/06fde88c-1610-4c85-ba4e-d9bcacfefe4c
# - http://webhook.site/06fde88c-1610-4c85-ba4e-d9bcacfefe4c