-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
131 lines (121 loc) · 4.7 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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
language: python
# Turn on sudo mode to facilitate the IPv6 workaround per
# github.com/travis-ci/travis-ci/issues/8711. See also related reference in
# before_script section.
sudo: true
addons:
apt:
sources:
- sourceline: deb https://packages.erlang-solutions.com/ubuntu trusty contrib
key_url: https://packages.erlang-solutions.com/ubuntu/erlang_solutions.asc
packages:
# apt-cache show erlang-nox=1:20.3-1 | grep Depends | tr ' ' '\n' | grep erlang | grep -v erlang-base-hipe | tr -d ',' | sed 's/$/=1:20.3-1/'
- erlang-base=1:20.3-1
- erlang-asn1=1:20.3-1
- erlang-corba=1:20.3-1
- erlang-crypto=1:20.3-1
- erlang-diameter=1:20.3-1
- erlang-edoc=1:20.3-1
- erlang-eldap=1:20.3-1
- erlang-erl-docgen=1:20.3-1
- erlang-eunit=1:20.3-1
- erlang-ic=1:20.3-1
- erlang-inets=1:20.3-1
- erlang-inviso=1:20.3-1
- erlang-mnesia=1:20.3-1
- erlang-odbc=1:20.3-1
- erlang-os-mon=1:20.3-1
- erlang-parsetools=1:20.3-1
- erlang-percept=1:20.3-1
- erlang-public-key=1:20.3-1
- erlang-runtime-tools=1:20.3-1
- erlang-snmp=1:20.3-1
- erlang-ssh=1:20.3-1
- erlang-ssl=1:20.3-1
- erlang-syntax-tools=1:20.3-1
- erlang-tools=1:20.3-1
- erlang-xmerl=1:20.3-1
- erlang-nox=1:20.3-1
env:
global:
- RABBITMQ_VERSION=3.7.4
- RABBITMQ_DOWNLOAD_URL="https://github.com/rabbitmq/rabbitmq-server/releases/download/v$RABBITMQ_VERSION/rabbitmq-server-generic-unix-$RABBITMQ_VERSION.tar.xz"
- RABBITMQ_TAR="rabbitmq-$RABBITMQ_VERSION.tar.xz"
- PATH=$HOME/.local/bin:$PATH
- AWS_DEFAULT_REGION=us-east-1
- secure: "Eghft2UgJmWuCgnqz6O+KV5F9AERzUbKIeXkcw7vsFAVdkB9z01XgqVLhQ6N+n6i8mkiRDkc0Jes6htVtO4Hi6lTTFeDhu661YCXXTFdRdsx+D9v5bgw8Q2bP41xFy0iao7otYqkzFKIo32Q2cUYzMUqXlS661Yai5DXldr3mjM="
- secure: "LjieH/Yh0ng5gwT6+Pl3rL7RMxxb/wOlogoLG7cS99XKdX6N4WRVFvWbHWwCxoVr0be2AcyQynu4VOn+0jC8iGfQjkJZ7UrJjZCDGWbNjAWrNcY0F9VdretFDy8Vn2sHfBXq8fINqszJkgTnmbQk8dZWUtj0m/RNVnOBeBcsIOU="
stages:
- test
- name: coverage
if: repo IS pika/pika
- name: deploy
if: tag IS present
cache:
apt: true
directories:
- $HOME/.cache
install:
- pip install -r test-requirements.txt
- pip install awscli==1.11.18
- if [ ! -d "$HOME/.cache" ]; then mkdir "$HOME/.cache"; fi
- if [ -s "$HOME/.cache/$RABBITMQ_TAR" ]; then echo "[INFO] found cached $RABBITMQ_TAR file"; else wget -O "$HOME/.cache/$RABBITMQ_TAR" "$RABBITMQ_DOWNLOAD_URL"; fi
- tar -C "$TRAVIS_BUILD_DIR" -xvf "$HOME/.cache/$RABBITMQ_TAR"
- sed -e "s#PIKA_DIR#$TRAVIS_BUILD_DIR#g" "$TRAVIS_BUILD_DIR/testdata/rabbitmq.conf.in" > "$TRAVIS_BUILD_DIR/testdata/rabbitmq.conf"
before_script:
# Enable IPv6 for our tests - see github.com/travis-ci/travis-ci/issues/8711
- echo 0 | sudo tee /proc/sys/net/ipv6/conf/all/disable_ipv6
- pip freeze
- /bin/sh -c "RABBITMQ_PID_FILE=$TRAVIS_BUILD_DIR/rabbitmq.pid RABBITMQ_CONFIG_FILE=$TRAVIS_BUILD_DIR/testdata/rabbitmq $TRAVIS_BUILD_DIR/rabbitmq_server-$RABBITMQ_VERSION/sbin/rabbitmq-server &"
- /bin/sh "$TRAVIS_BUILD_DIR/rabbitmq_server-$RABBITMQ_VERSION/sbin/rabbitmqctl" wait "$TRAVIS_BUILD_DIR/rabbitmq.pid"
- /bin/sh "$TRAVIS_BUILD_DIR/rabbitmq_server-$RABBITMQ_VERSION/sbin/rabbitmqctl" status
script:
# See https://github.com/travis-ci/travis-ci/issues/1066 and https://github.com/pika/pika/pull/984#issuecomment-370565220
# as to why 'set -e' and 'set +e' are added here
- set -e
- nosetests
- PIKA_TEST_TLS=true nosetests
- set +e
after_success:
- aws s3 cp .coverage "s3://com-gavinroy-travis/pika/$TRAVIS_BUILD_NUMBER/.coverage.${TRAVIS_PYTHON_VERSION}"
jobs:
include:
- python: pypy3
- python: pypy
- python: 2.7
- python: 3.4
- python: 3.5
- python: 3.6
- python: 3.7-dev
- stage: coverage
python: 3.6
services: []
install:
- pip install awscli coverage codecov
before_script: []
script:
- mkdir coverage
- aws s3 cp --recursive s3://com-gavinroy-travis/pika/$TRAVIS_BUILD_NUMBER/ coverage
- cd coverage
- coverage combine
- cd ..
- mv coverage/.coverage .
- coverage report
after_success: codecov
- stage: deploy
if: repo IS pika/pika
python: 3.6
services: []
install: true
before_script: []
script: true
after_success: []
deploy:
distributions: sdist bdist_wheel
provider: pypi
user: crad
on:
tags: true
all_branches: true
password:
secure: "V/JTU/X9C6uUUVGEAWmWWbmKW7NzVVlC/JWYpo05Ha9c0YV0vX4jOfov2EUAphM0WwkD/MRhz4dq3kCU5+cjHxR3aTSb+sbiElsCpaciaPkyrns+0wT5MCMO29Lpnq2qBLc1ePR1ey5aTWC/VibgFJOL7H/3wyvukL6ZaCnktYk="