forked from argoproj/argo-events
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
49 lines (42 loc) · 1.23 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
language: go
go:
- 1.x
services:
- docker
cache:
directories:
- $HOME/bin
- $HOME/docker
env:
global:
- DOCKER_PUSH=false
- IMAGE_TAG=v0.10-test
- PATH=$HOME/bin:$PATH
before_install:
# Load cached docker images
- if [[ -d $HOME/docker ]]; then ls $HOME/docker/*.tar.gz | xargs -I {file} sh -c "zcat {file} | docker load"; fi
- go get github.com/mattn/goveralls
- if [ ! -d $HOME/bin/kubectl ]; then
mkdir -p $HOME/bin;
curl -o $HOME/bin/kubectl -L https://storage.googleapis.com/kubernetes-release/release/v1.13.4/bin/linux/amd64/kubectl;
chmod +x $HOME/bin/kubectl;
fi
before_cache:
# Save tagged docker images
- >
mkdir -p $HOME/docker && docker images -a --filter='dangling=false' --format '{{.Repository}}:{{.Tag}} {{.ID}}'
| xargs -n 2 -t sh -c 'test -e $HOME/docker/$1.tar.gz || docker save $0 | gzip -2 > $HOME/docker/$1.tar.gz'
install:
- curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
- dep version
- dep ensure -vendor-only
script:
- make all
- make test coverage
- $GOPATH/bin/goveralls -coverprofile=profile.cov -service=travis-ci
deploy:
provider: releases
api_key: $GITHUB_OAUTH_TOKEN
skip_cleanup: true
on:
tags: true