machine: pre: - curl -o go.tar.gz -sL https://golang.org/dl/go1.4rc2.linux-amd64.tar.gz - sudo rm -rf /usr/local/go - sudo tar -C /usr/local -xzf go.tar.gz - sudo chmod a+w /usr/local/go/src/ hosts: fancy: 127.0.0.1 dependencies: post: - go get github.com/axw/gocov/gocov - go get github.com/mattn/goveralls - go get github.com/golang/lint/golint test: pre: - go version override: - test -z $(gofmt -s -l . | tee /dev/stderr) - go vet ./... - test -z $(golint ./... | tee /dev/stderr) - go test -test.v ./... # Disabling the race detector due to massive memory usage. # - go test -race -test.v ./...: # timeout: 600 # TODO(stevvooe): The following is an attempt at using goveralls but it # just doesn't work. goveralls requires a single profile file to be # submitted at once, but can't run all of the tests for all the packages # at once. The command below attempts to fix this but fails because it # creates a new "job" for run of coveralls, making it so that the coverage # is partially reported a large number of times. # - cd $HOME/.go_project/src/github.com/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME && go list ./... | xargs -I{} goveralls -service circleci -repotoken $COVERALLS_TOKEN -race {} general: branches: ignore: - master - 0.7 - 0.8 - 0.9 - 1.0 # This doesn't work, but it would be nice if it did. # build_dir: ../.go_project/src/github.com/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME # notify: # email: # recipients: # - distribution@docker.com # slack: # team: docker # channel: "#dt" # username: mom # token: {{SLACK_TOKEN}} # on_success: false # on_failure: true # Do we want these as well? # - go get code.google.com/p/go.tools/cmd/goimports # - test -z "$(goimports -l -w ./... | tee /dev/stderr)" # http://labix.org/gocheck