---
machine:
  post:
    - go get github.com/jstemmer/go-junit-report
    - go get github.com/axw/gocov/gocov
    - go get github.com/AlekSi/gocov-xml

test:
  override:
    - go test -v -race ./... | go-junit-report > report.xml
    - go test -v -race -coverprofile=cover.out ./...
    - gocov convert cover.out | gocov-xml > coverage.xml
  post:
    - bash <(curl -s https://codecov.io/bash)

---
machine:
  post:
    - go get github.com/jstemmer/go-junit-report
    - go get github.com/axw/gocov/gocov
    - go get github.com/AlekSi/gocov-xml

test:
  override:
    - mkdir -p $CIRCLE_TEST_REPORTS/go-junit
    - go test -v -race ./... | go-junit-report > $CIRCLE_TEST_REPORTS/go-junit/report.xml
    - go test -v -race -coverprofile=cover.out ./...
    - gocov convert cover.out | gocov-xml > coverage.xml
  post:
    - bash <(curl -s https://codecov.io/bash)

Put JUnit format test report in CircleCI-designated folder
Put JUnit format test report in CircleCI-designated folder
