-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathcircle.yml
30 lines (26 loc) · 1.15 KB
/
circle.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
machine:
environment:
GO_VERSION: "1.10.2"
IMPORT_PATH: "github.com/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME"
GOPATH: "$HOME/.gvm/pkgsets/stable/global"
services:
- docker
dependencies:
pre:
- bash < <(curl -s -S -L https://raw.githubusercontent.com/moovweb/gvm/1.0.22/binscripts/gvm-installer)
- source "$HOME/.gvm/scripts/gvm" && gvm install go$GO_VERSION -B --name=stable && gvm use stable --default
- go get -u honnef.co/go/tools/...
- go get -u github.com/golang/lint/golint
- docker run -d -t -p 4567:4567 dlsniper/kinesalite:1.8.0
override:
- mkdir -p "$GOPATH/src/$IMPORT_PATH"
- rsync -azvrC --delete $HOME/$CIRCLE_PROJECT_REPONAME "$GOPATH/src/github.com/$CIRCLE_PROJECT_USERNAME/"
- go get -u github.com/Masterminds/glide && go install github.com/Masterminds/glide
- cd $GOPATH/src/$IMPORT_PATH && glide i
test:
pre:
- cd "$GOPATH/src/$IMPORT_PATH" && go vet $(glide nv)
- cd "$GOPATH/src/$IMPORT_PATH" && golint -set_exit_status $(glide nv)
- cd "$GOPATH/src/$IMPORT_PATH" && gosimple $(glide nv)
override:
- cd $GOPATH/src/$IMPORT_PATH && go test -v -race -cover $(glide nv)