-
Notifications
You must be signed in to change notification settings - Fork 8
/
.travis.yml
67 lines (67 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
sudo: required
services:
- docker
language: go
go:
- 1.12
- tip
go_import_path: github.com/bivas/rivi
install: true
script:
- export RIVI_DEBUG=1
- go list ./... | grep -v vendor | xargs go vet
- go list ./... | grep -v vendor | xargs go test -v
- echo "" > coverage.txt ;
for d in $(go list ./... | grep -v vendor); do
go test -race -coverprofile=profile.out -covermode=atomic $d ;
if [ -f profile.out ]; then
cat profile.out >> coverage.txt ;
rm profile.out ;
fi
done
- GOOS=linux GOARCH=amd64 go build -o rivi cmd/rivi/main.go
env:
global:
- VERSION=$(echo $TRAVIS_TAG)
- secure: L2jJVUBeu6Ki2kNR18QsFngISb+WxVkGFdWrLhNriRFdFBDbcn7SQfpF4RmiddN/r85NLf1v5LyXeQRdo1QwS8Kjzu8zXh7yJ4LnwKviPmGjpKofaPnNc+uxAe2NXyFT483RB4hD7rBDDrLzJdzeg/iKnUcRbEYKaF1HKbM0MO+lXX4galm+CLeGGChOPjXSbtPf+wliJwcq7wOqDnfM2K2OGD9ckq7I0Cj9F6Z6aMLA1GC/UK/0q5ERLKRQO3sLO60Fn4WsxkTOGajkHd1bXp7wkJPoYu+x57orJBQurZ+tTAMFT5AMqaKhMsjq1BOqkgM0XRy1JpSz36DYYr8v5AujXEQsrix9hzJFLHQ2GaPN6zkLxnfY95Y2PrsEMj6HMdsA9uUblg/gG3uDY8fGfnaRDhtDvMOpNZeltnjHT1INDE+icUBpXxPqPp70TUtWqdUzv8Wa9yehMCDgB8oNi8LJO8KPZyZuI1zlZWttfKbXl9tbr7evyWP8bJwbnZWt+FLa4KmlA1bvn693VaU7JarOOzkh2vxlwVXRhB0teFsziY/UvgvLRzlAJU3cuwPFLvN25oR+E1G/IZsXtMhWG//x+gGhdpDSrJ89vmOLIoL9uJ+3AmmmEBpSmFCZZJJlJ9caBSVTompN+4h4LsQaLS2BjQMM8UGrAeg/mn4NLmg=
- secure: CTC2IJIrfjwWpL7EGii986sFabzpHzhCXde56JXWFnAFIb0KEXY/WtgAkwJ8GB/3Np4CjEOJ6PJD7QWREVLamNvPCF7fU7ahyBcBW4SCnrljOe9mz9x8QwmleLaQQkZ2ciXY3/PyDDqyAFm/pG3/YmkFt7oDL4sp8eJgjrVzxUCTPd5CiHDv/Ui/vfTXLNCi1CIfZ6Gu6h/J2cc+bpKYjxn3fqao2KUzudshe0e/gcmoUCgfHqfxzkyLQakK6YTq3KwYNPdRyY3A7cyYHGLK1oOhodhnk81H/rfzJxvzXV27R3STSKeqYGPl4Y1Y5PFo6/ryeuGea1Aw0fLXjhrp6yPWaQ5DxeSUx+q2M39Pxwu8DnhPn+PMbDWIaxdiiRkxa3MJrf4jVujnNqlhq3m3y8qhZgMOojyHTeryzYOHb4KwcfEK+ujMaKUZfijjB349dJ26GOvnoGowLOGw1MaWOeufkHl9SmsRTcv1XTBYia6rGUluipReb6Pc4EXJdEJJfErpxTagLVWkG0JanIpg19vHenQAWhkGRz6WUpofxQlmscwvezQZh4jpAYTlFOA+/Pwn9RVhiMPJSF9L6cPxxgol1Z1ZkfQa5ETw7Xsf64i+6obcYETnAaRKbiOyjffnxiUG1BAnFT8X7n3Isiz7OXOWQc6INvYGfO44aO0lqKU=
after_success:
- bash <(curl -s https://codecov.io/bash)
- export DOCKER_TAG="unstable"
- if [ "$TRAVIS_BRANCH" == "master" ]; then
export DOCKER_TAG="latest";
fi
- if [ "$TRAVIS_BRANCH" == "development" ]; then
export DOCKER_TAG="development";
fi
- if [ "$TRAVIS_TAG" != "" ]; then
export DOCKER_TAG="$TRAVIS_TAG";
fi
- if [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$DOCKER_TAG" != "unstable" ]; then
docker build --tag bivas/rivi:$DOCKER_TAG --label "rivi.hash=$TRAVIS_COMMIT" . ;
docker login -u="$DOCKER_USER" -p="$DOCKER_PASS";
docker push bivas/rivi:$DOCKER_TAG ;
fi
- echo "Done"
before_deploy:
- GOOS=linux GOARCH=amd64 go build -o rivi-${VERSION}-linux-amd64 cmd/rivi/main.go
- GOOS=darwin GOARCH=amd64 go build -o rivi-${VERSION}-darwin-amd64 cmd/rivi/main.go
- GOOS=windows GOARCH=amd64 go build -o rivi-${VERSION}-windows-amd64 cmd/rivi/main.go
after_deploy:
- git config --global user.email "travis@travis-ci.org"
- git config --global user.name "Travis CI"
- git checkout master ;
- git pull --ff-only ;
- git merge $TRAVIS_TAG --no-ff ;
- git push ;
deploy:
provider: releases
api_key:
secure: awpl9niknI0uPR7hf8UuZqPNaY53AzhxVGBEQ05sn5HCxAtELHz874HjwOorI2kOxSaUSNnTpRLaRtTloAhGFjoYVWOpo0NlnpbSlu7qVZdi7dtRFb2mEttcmZcV+6gu6Wv0eZQHKrhtKIPdFe9J5dcb135iH7g7YFdiTOGVUIrzuun8WU6wfylGwMX4Ipzh+zD5W76PeFanP4C2gTN7Tu/Sn7SKkgFrV4t08+0FuTnmxu8GLnnT0GqlIDHYeitRRfctwXOO+WiAKJnFK/4IIJqCck/dAVsAQFcqM5pdWkWrbwQZr37aZm9aSYEFFm2AYlo6xg9mUDZqLefm2OFs5E+x89N15nKSH9NCerGzoXZ/YXDJl/OcS4SJfCzQN8LwOU+sxl3CSKWzA6vV46jJaxp327JeIaIVqTV8nKStmaUnY1gRz0xoQn98yDApkcLUtvp4rH+wE/p+XSeMwURpx6YWcvvagKaymoUuLeJtjSAaAEy733maiu/qs7lLhD3drxQjohefyNNHoI971T8Gix7Tsutuzon7V1SZEs7UM8mgCO/KPF1x3EhkwEePEVUYNjH+1tZZoz/yF6dsHmLV5x2HVO93ncfaQ6AvydbmwtOpMPLFrFwrXG3K2FRPyZ7CHUppckpvB53wCQEZNeacWEt1JbjlsVhFys6aFremrjk=
file:
- rivi-$VERSION-darwin-amd64
- rivi-$VERSION-linux-amd64
- rivi-$VERSION-windows-amd64
skip_cleanup: true
on:
tags: true