diff --git a/.circleci/config.yml b/.circleci/config.yml index a0e9ed94b..062a472c5 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,9 +1,29 @@ version: 2 + +workflows: + version: 2 + ci: + jobs: + - test + - lint + jobs: - build: + test: docker: - image: circleci/golang:1.10 working_directory: /go/src/github.com/circleci/circleci-cli steps: - checkout - run: make test + lint: + docker: + - image: circleci/golang:1.10 + working_directory: /go/src/github.com/circleci/circleci-cli + steps: + - checkout + - run: + name: Install + command: | + go get -u github.com/alecthomas/gometalinter + gometalinter --install + - run: make lint diff --git a/Makefile b/Makefile index 75f808542..92caccb0a 100644 --- a/Makefile +++ b/Makefile @@ -28,3 +28,7 @@ test: .PHONY: cover coverage: go test -coverprofile=coverage.txt -covermode=count ./... + +.PHONY: lint +lint: + gometalinter --vendor ./...