-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcircle.yml
25 lines (21 loc) · 859 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
machine:
environment:
IMPORT_PATH: "github.com/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME"
COVERAGE_PROFILE: "/home/ubuntu/coverage.out"
test:
pre:
- go vet ./...
- go get github.com/mattn/goveralls
- go get golang.org/x/tools/cmd/cover
override:
- go test -v -cover -race -coverprofile=$COVERAGE_PROFILE .
post:
- if [ -n "$COVERALLS_TOKEN" ]; then /home/ubuntu/.go_workspace/bin/goveralls -coverprofile=$COVERAGE_PROFILE -service=circle-ci -repotoken=$COVERALLS_TOKEN ; fi
deployment:
publish:
tag: /v.*/
commands:
- go get github.com/mitchellh/gox
- go get github.com/tcnksm/ghr
- gox -ldflags "-X main.VERSION $CIRCLE_TAG" -output "dist/ws-client_{{.OS}}_{{.Arch}}"
- ghr -t $GITHUB_TOKEN -u $CIRCLE_PROJECT_USERNAME -r $CIRCLE_PROJECT_REPONAME --replace $CIRCLE_TAG dist/