-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcircle.yml
44 lines (40 loc) · 1013 Bytes
/
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
36
37
38
39
40
41
42
43
44
general:
branches:
only:
- master
- develop
- /feature\/.*/
machine:
timezone:
UTC
services:
- docker
environment:
IMPORT_PATH: "github.com/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME"
GOROOT: $HOME/golang
GOPATH: $HOME/go
PATH: $GOROOT/bin:$GOPATH/bin:$PATH
dependencies:
cache_directories:
- "~/golang"
pre:
- bash ~/golang-releases-test/circleci/install-go.sh
override:
- go get -u github.com/golang/lint/golint
- go get -u github.com/tcnksm/ghr
- mkdir -p "$GOPATH/src/$IMPORT_PATH"
- rsync -azC --delete ./ "$GOPATH/src/$IMPORT_PATH/"
test:
pre:
- go version
override:
- go vet .
- golint .
- go test -v -cover .:
timeout: 600
deployment:
master:
branch: master
commands:
- go build -o $CIRCLE_ARTIFACTS/test_`git describe --tags --abbrev=0`
- ghr -u $CIRCLE_PROJECT_USERNAME -r $CIRCLE_PROJECT_REPONAME -delete `git describe --tags --abbrev=0` $CIRCLE_ARTIFACTS/