| 1 |
version: 2 |
| 2 |
jobs: |
| 3 |
build: |
| 4 |
docker: |
| 5 |
- image: circleci/golang:latest |
| 6 |
working_directory: /go/src/github.com/c-robinson/iplib |
| 7 |
|
| 8 |
environment: |
| 9 |
TEST_RESULTS: /tmp/test-results |
| 10 |
|
| 11 |
steps: |
| 12 |
- checkout |
| 13 |
- run: mkdir -p $TEST_RESULTS |
| 14 |
- run: go get github.com/mattn/goveralls |
| 15 |
- run: |
| 16 |
name: Run unit tests |
| 17 |
command: | |
| 18 |
go test -v -cover -race -coverprofile=${TEST_RESULTS}/coverage.out ./... |
| 19 |
- run: |
| 20 |
name: Upload coverage results |
| 21 |
command: | |
| 22 |
goveralls -coverprofile=${TEST_RESULTS}/coverage.out -service=circle-ci -repotoken=$COVERALLS_TOKEN |
| 23 |
|