machine:
  environment:
    GOPATH: "$HOME/.go_workspace"
    PROJECT: $CIRCLE_PROJECT_REPONAME
    USER: $CIRCLE_PROJECT_USERNAME
    IMPORT_PATH: $GOPATH/src/github.com/$CIRCLE_PROJECT_USERNAME
    APP_PATH: $IMPORT_PATH/$CIRCLE_PROJECT_REPONAME

checkout:
  post:
    - rm -rf $APP_PATH
    - mkdir -p $IMPORT_PATH
    - cp -R ~/$PROJECT $APP_PATH

dependencies:
  override:
    - cd $APP_PATH && go get -t -v ./...

test:
  pre:
    - go vet ./...
  override:
    - go test ./... -race
