machine:
  environment:
    IMPORT_PATH: "github.com/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME"

dependencies:
  pre:
    - go get github.com/tools/godep
  override:
    - mkdir -p "$GOPATH/src/$IMPORT_PATH"
    - rsync -azC --delete ./ "$GOPATH/src/$IMPORT_PATH/"
    - godep restore ./...

test:
  pre:
    # Getting import errors in circleci
    - go get github.com/apigee/henchman/henchman
    - go vet -x ./...
  override:
    - godep restore
    - go test -v ./...
  post:    
    - sh ./package.sh

general:
  artifacts:
    - "artefacts/*.tar.gz"
machine:
  environment:
    IMPORT_PATH: "github.com/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME"

dependencies:
  pre:
    - go get github.com/tools/godep
  override:
    - mkdir -p "$GOPATH/src/$IMPORT_PATH"
    - rsync -azC --delete ./ "$GOPATH/src/$IMPORT_PATH/"
    - godep restore ./...

test:
  pre:
    # Getting import errors in circleci
    - go get github.com/apigee/henchman/henchman
    - go vet -x ./...
  override:
    - godep restore
    - go test -v ./...
    - go test ./henchman -covermode=count -coverprofile=coverage.out -coverpkg=./...
  post:
    - sh ./package.sh
    - go tool cover -html=coverage.out -o artefacts/coverage.html

general:
  artifacts:
    - "artefacts/*.tar.gz"
Add coverage output to artefacts
Add coverage output to artefacts
