version: 2 jobs: build: docker: - image: circleci/golang:latest working_directory: /go/src/github.com/c-robinson/iplib environment: TEST_RESULTS: /tmp/test-results steps: - checkout - run: mkdir -p $TEST_RESULTS - run: go get github.com/mattn/goveralls - run: name: Run unit tests command: | go test -v -cover -race -coverprofile=${TEST_RESULTS}/coverage.out ./... - run: name: Upload coverage results command: | goveralls -coverprofile=${TEST_RESULTS}/coverage.out -service=circle-ci -repotoken=$COVERALLS_TOKEN