machine:
  environment:
    GO15VENDOREXPERIMENT: 1
    GOROOT: "/home/ubuntu/go"
    PATH: "/home/ubuntu/go/bin:$PATH"

dependencies:
  cache_directories:
    - "/home/ubuntu/go"
  pre:
    - if [[ ! -e /home/ubuntu/go/bin/go ]]; then cd /home/ubuntu; curl https://storage.googleapis.com/golang/go1.5.1.linux-amd64.tar.gz | tar -xz; fi
    - go get -u github.com/jstemmer/go-junit-report

test:
  override:
    - mkdir -p $CIRCLE_TEST_REPORTS/golang:
        parallel: true    
    - go test -v $(go list ./...|grep -v vendor) | go-junit-report set-exit-code=true > $CIRCLE_TEST_REPORTS/golang/$CIRCLE_NODE_INDEX.xml:
        parallel: true

gits