forked from yarpc/yarpc-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
108 lines (98 loc) · 4.3 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
sudo: false
language: go
go_import_path: go.uber.org/yarpc
env:
global:
- GO15VENDOREXPERIMENT=1
matrix:
# Fail the build as soon as the first job fails
fast_finish: true
include:
# Crossdock
- go: 1.7
services: [docker]
sudo: required
env:
- TYPE=crossdock
- DOCKER_COMPOSE_VERSION=1.8.0
- COMMIT=${TRAVIS_COMMIT::8}
- secure: rZOVU0zQTkPvaG43IIt/guPoq3EAE6/So/+elGcmHF14PsfPcPQ6MyexqdwRkVPd/fAuNwiXXwTXHkjI8ECYz5LF+m+g2VwvrhE9H1wfLuGbtgXSSXqB+dqylHGUz4ksm4q1gwiet8fpVHlNfbSfu+lhTpbl4+SUfFK+s9LqnAKbm+Hi8vKzyhGhvlTngi0Y2O4Z2FLUgU2fkUm5fesdUyW0H2/Bn5KRqJRtcyTmmj4eD/qMq5WDe8n5Sy9J+kuCpweC8vBZQzAGuPpGdj8jvbPCO+N2xM26Y7DNKMsgj6IU49D6sbmLvyVMbI1pBeAQ54TCJx5LySuZpLAzyaaqHEDwOs4+cRolZSQwpd7Q8/wOxZ13KqMhYOokBIcDlLs0yB9J3KOTS1lxU8YC6A3j+Wenw9/JjL0sXSSeOAvNkAeVtEu3dqXg326HJjzXgIQbci83TTtWv4MsQKIXMADOgMnQdgd4JRaGyfxM2hswsE2/Y5OlyXqrqtFHvgKy6MpLTB26r3aRA22VY6p5hFhuEGLClbHidyeHgkNI2iHOXZqoEdmno33E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Dzjcoz5MA6Nj75/Mk4bJzzLEem3EKs1TTZOqV1NVt7VJ887NPe4fLIxP1/jQLzsh6kShTcctLszc70NgrowdwhdIqN/3TUmxkVbGP2JzbQ4yR6LVKCDDeWpKGiPsIKy75kEiW4ZlEZhnwCOKaR94FyBy1HEnhyoD9OJD6Gq/u4UdEw/QuNfE89gbr47LA4z487AzYGzH+1J3MlEbTNgTCmWduC0ghTx33vItrYMXXabGDe7XwfdJKTnMjfXVv+CVBdMAZVtDL27sEmbbAzIrRjP+JOFm7ZRYfzvxu5vCWlB/3wMMt7DzcutjxR4tyYs71Ec5zdUH/16wSvjQR1laJZCujlNSA/3FZUizCzW3qFVsBkaWRF+/C/cksi6cR83xIrc4y4WRLttAcbfqmsXaigL5Iz4GbLg62vmFP88=
# Lint
- go: 1.7
env: TYPE=lint
# Tests
#
# Need virtualenv for example tests
- go: 1.7
env: TYPE=test
addons: {apt: {packages: [python-virtualenv]}}
- go: tip
env: TYPE=test
addons: {apt: {packages: [python-virtualenv]}}
before_install:
- go version
- |
set -e
case "$TYPE" in
crossdock)
docker version
sudo rm -f /usr/local/bin/docker-compose
curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose
chmod +x docker-compose
sudo mv docker-compose /usr/local/bin
docker-compose version
;;
esac
set +e
install:
- |
set -e
make install
case "$TYPE" in
lint)
go get -u -f github.com/golang/lint/golint
;;
test)
go get github.com/wadey/gocovmerge
go get github.com/mattn/goveralls
go get golang.org/x/tools/cmd/cover
;;
esac
set +e
script:
- |
set -e
case "$TYPE" in
lint)
make lint
;;
test)
rm -rf $GOPATH/pkg
make test_ci
make test-examples
travis_retry goveralls -coverprofile=cover.out -service=travis-ci || true
;;
crossdock)
make crossdock
docker-compose logs
;;
esac
set +e
after_success:
- |
set -e
case "$TYPE" in
crossdock)
export REPO=yarpc/yarpc-go
export BRANCH=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then echo $TRAVIS_BRANCH; else echo $TRAVIS_PULL_REQUEST_BRANCH; fi)
export TAG=`if [ "$BRANCH" == "master" ]; then echo "latest"; else echo $BRANCH; fi`
docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS
docker build -f Dockerfile -t $REPO:$COMMIT .
docker tag $REPO:$COMMIT $REPO:$TAG
docker tag $REPO:$COMMIT $REPO:travis-$TRAVIS_BUILD_NUMBER
docker push $REPO
;;
esac
set +e