From 62075f71e629e634677ba6dc12ec59a5dd4165e0 Mon Sep 17 00:00:00 2001 From: Enrico Stahn Date: Wed, 28 Feb 2018 14:02:59 +1100 Subject: [PATCH] Update golang builds to 1.10 and enable code coverage --- .circleci/config.yml | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 82c342f..53870f2 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -7,17 +7,27 @@ jobs: test: <<: *defaults docker: - - image: circleci/golang:1.9 + - image: circleci/golang:1.10 steps: - 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: 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: <<: *defaults docker: - - image: circleci/golang:1.9 + - image: circleci/golang:1.10 steps: - 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 @@ -28,7 +38,7 @@ jobs: deploy: <<: *defaults docker: - - image: circleci/golang:1.9 + - image: circleci/golang:1.10 steps: - checkout - setup_remote_docker: