-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
66 lines (51 loc) · 1.37 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
dist: trusty
services:
- docker
language: go
go:
- "1.11"
# Only clone the most recent commit
git:
depth: 1
branches:
except:
- staging.tmp
env:
global:
- DEP_VERSION="0.5.0"
- DOCKER_COMPOSE_VERSION=1.22.0
addons:
apt:
packages:
- docker-ce
before_install:
# Download dep binary to $GOPATH/bin
- if [[ ! -z ${TRAVIS_TAG} ]]; then
curl -L -s https://github.com/golang/dep/releases/download/v${DEP_VERSION}/dep-linux-amd64 -o $GOPATH/bin/dep &&
chmod +x $GOPATH/bin/dep;
fi
# Docker-Compose
- sudo rm /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
install:
# Only install local deps if its a tagged-commit
- if [[ ! -z ${TRAVIS_TAG} ]]; then dep ensure; fi
before_script:
- chmod +x ./run_test.sh
script:
- ./run_test.sh
after_script:
- docker-compose -f ./test/docker-compose.yaml down --volumes --rmi all
after_success:
- test -n "$TRAVIS_TAG"
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
deploy:
- provider: script
skip_cleanup: true
script: curl -sL https://git.io/goreleaser | bash -s -- --debug --skip-validate
on:
all_branches: true
tags: true