-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcircle.yml
47 lines (43 loc) · 1.61 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
36
37
38
39
40
41
42
43
44
45
46
47
---
machine:
xcode:
version: 8.2.1 # build 8C1002, OS X 10.11.6 (15G1108)
environment:
XCODE_SCHEME: keychain # required for circleci macOS test
XCODE_WORKSPACE: keychain.xcworkspace # required for circleci macOS test
HOMEBREW_CACHE: "$HOME/.cache/Homebrew" # cache for Homebrew
HOMEBREW_NO_AUTO_UPDATE: 1 # avoid 'brew update' which is automatically executed by default
GOPATH: "$HOME/.go_workspace"
PATH: "$HOME/.go_workspace/bin:$PATH"
IMPORT_PATH: "github.com/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME" # for $GOPATH hack on circleci build environment
general:
build_dir: "../.go_workspace/src/$IMPORT_PATH" # change build_dir to packages directory under the $GOPATH
checkout:
post:
- |
mkdir -p "$GOPATH/src/$IMPORT_PATH"
rsync -azC --delete "$HOME/$CIRCLE_PROJECT_REPONAME/" "$GOPATH/src/$IMPORT_PATH/"
dependencies:
pre:
- uname -a
- sw_vers
- env | sort
override:
- |
mkdir -p "$HOMEBREW_CACHE"
brew upgrade https://github.com/Homebrew/homebrew-core/raw/master/Formula/go.rb || true
- go get -u github.com/golang/lint/golint
post:
- |
go version
go env
cache_directories:
- '~/.cache/Homebrew'
test:
override:
- go test -v -race -cover -covermode=atomic -coverprofile=coverage.txt .
post:
- bash <(curl -s https://codecov.io/bash)
- test -z "$(gofmt -e -s -l $(find . -not -iwholename '*vendor*' -and -name '*.go' -print) | tee /dev/stderr)"
- test -z "$(golint -set_exit_status $(go list ./... | grep -v vendor) | tee /dev/stderr)"
- go vet "$(go list ./... | grep -v vendor)"