forked from pika/pika
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
108 lines (98 loc) · 3.92 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
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:
- erlang-nox
env:
global:
- RABBITMQ_VERSION=3.8.2
- 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 = 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.5
- python: 3.6
- python: 3.7
dist: xenial # required for Python 3.7 (travis-ci/travis-ci#9069)
- python: 3.8
dist: xenial
- stage: coverage
if: fork = false OR type != pull_request
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 = 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="