Update golang builds to 1.10 and enable code coverage

This commit is contained in:
Enrico Stahn 2018-02-28 14:02:59 +11:00
parent 5cb6877018
commit 62075f71e6
No known key found for this signature in database
GPG key ID: 5263621C269A50DE

View file

@ -7,17 +7,27 @@ jobs:
test: test:
<<: *defaults <<: *defaults
docker: docker:
- image: circleci/golang:1.9 - image: circleci/golang:1.10
steps: steps:
- checkout - checkout
- run:
name: Setup Code Climate test-reporter
command: |
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > /bin/cc-test-reporter
chmod +x /bin/cc-test-reporter
- run: curl -L -s https://github.com/golang/dep/releases/download/v0.4.1/dep-linux-amd64 -o /go/bin/dep && chmod +x /go/bin/dep - run: curl -L -s https://github.com/golang/dep/releases/download/v0.4.1/dep-linux-amd64 -o /go/bin/dep && chmod +x /go/bin/dep
- run: dep ensure -vendor-only - run: dep ensure -vendor-only
- run: go test -v ./... - run:
name: Run tests
command: |
cc-test-reporter before-build
go test -v -coverprofile=c.out ./...
cc-test-reporter after-build --exit-code $?
lint: lint:
<<: *defaults <<: *defaults
docker: docker:
- image: circleci/golang:1.9 - image: circleci/golang:1.10
steps: steps:
- checkout - checkout
- run: curl -L -s https://github.com/golang/dep/releases/download/v0.4.1/dep-linux-amd64 -o /go/bin/dep && chmod +x /go/bin/dep - run: curl -L -s https://github.com/golang/dep/releases/download/v0.4.1/dep-linux-amd64 -o /go/bin/dep && chmod +x /go/bin/dep
@ -28,7 +38,7 @@ jobs:
deploy: deploy:
<<: *defaults <<: *defaults
docker: docker:
- image: circleci/golang:1.9 - image: circleci/golang:1.10
steps: steps:
- checkout - checkout
- setup_remote_docker: - setup_remote_docker: