version: 2
jobs:
  build:
    docker:
      - image: circleci/golang:1.9
    working_directory: /go/src/github.com/bluekeyes/hatpear
    steps:
      - checkout
      - run: go get -v -t -d ./...
      - run: go test -v ./...
      - run: go vet ./...

version: 2
jobs:
  build:
    docker:
      - image: circleci/golang:1.9

    working_directory: /go/src/github.com/bluekeyes/hatpear
    steps:
      - checkout

      - run: mkdir -p /tmp/test-results
      - run: go get github.com/jstemmer/go-junit-report
      - run:
          name: Build and Test
          command: |
            trap "go-junit-report < /tmp/test-results/go-test.out > /tmp/test-results/go-test-report.xml" EXIT
            go test -v ./... | tee /tmp/test-results/go-test.out

      - run: go vet ./...

      - store_artifacts:
          path: /tmp/test-results
          destination: raw-test-output

      - store_test_results:
          path: /tmp/test-results

Format test results as JUnit XML
Format test results as JUnit XML
