-
Notifications
You must be signed in to change notification settings - Fork 1
/
circle.yml
35 lines (33 loc) · 1.27 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
31
32
33
34
35
machine:
services:
- docker
environment:
GODIST: "go1.7.linux-amd64.tar.gz"
GO_BUILD_DIR: "$HOME/.go_project/src/github.com/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME"
pre:
# install docker 1.10, set its proxies
- curl -sSL https://s3.amazonaws.com/circle-downloads/install-circleci-docker.sh | bash -s -- 1.10.0
post:
- mkdir -p download
- test -e download/$GODIST || curl -o download/$GODIST https://storage.googleapis.com/golang/$GODIST
- sudo rm -rf /usr/local/go
- sudo tar -C /usr/local -xzf download/$GODIST
dependencies:
cache_directories:
- download
- $GO_BUILD_DIR/vendor/src
override:
- mkdir -p $HOME/.go_project/src/github.com/$CIRCLE_PROJECT_USERNAME
- ln -fs $HOME/$CIRCLE_PROJECT_REPONAME $GO_BUILD_DIR
- |
echo 'export GOPATH=$GOPATH:$HOME/.go_project' >> ~/.circlerc
- cd $GO_BUILD_DIR && go get -u github.com/kardianos/govendor
- cd $GO_BUILD_DIR && govendor sync
test:
pre:
- cd $GO_BUILD_DIR && govendor vet +local
- ./go-test.sh
override:
# - ./circle-test.sh
- cd $GO_BUILD_DIR && govendor test /$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/lib/client -coverprofile=coverage.out
# - cd $GO_BUILD_DIR && go tool cover -html=coverage.out -o coverage.html