version: 2
jobs:
  build:
    working_directory: /go/src/github.com/oinume/algo
    docker:
      - image: golang:1.12-stretch
        environment:
    steps:
      - checkout
      - run:
          name: "Set .gitconfig"
          command: |
            echo "" > ~/.gitconfig
            git config --global url."https://github.com".insteadOf git://github.com
            git config --global http.https://gopkg.in.followRedirects true
      - run:
          name: "Install dep"
          command: |
            go get github.com/golang/dep/cmd/dep
      - restore_cache:
          key: go-dep-{{ checksum "Gopkg.lock" }}
      - run:
          name: "Install dependencies"
          command: |
            if [ ! -e "/go/src/github.com/oinume/algo/vendor" ]; then
              dep ensure -v
            fi
      - save_cache:
          key: go-dep-{{ checksum "Gopkg.lock" }}
          paths:
            - "/go/src/github.com/oinume/algo/vendor"
#      - run:
#          name: "Run go-lint"
#          command: make go-lint
      - run:
          name: "Run go-test"
          command: |
            go test -v -race -coverprofile=coverage.txt -covermode=atomic ./...
      - run:
          name: "Upload to codecov"
          command: |
            bash <(curl -s https://codecov.io/bash)

version: 2
jobs:
  build:
    working_directory: /go/src/github.com/oinume/algo
    docker:
      - image: golang:1.12-stretch
        environment:
    steps:
      - checkout
      - run:
          name: "Set .gitconfig"
          command: |
            echo "" > ~/.gitconfig
            git config --global url."https://github.com".insteadOf git://github.com
            git config --global http.https://gopkg.in.followRedirects true
      - run:
          name: "Install dep"
          command: |
            go get github.com/golang/dep/cmd/dep
      - restore_cache:
          key: go-dep-{{ checksum "Gopkg.lock" }}
      - run:
          name: "Install dependencies"
          command: |
            if [ ! -e "/go/src/github.com/oinume/algo/vendor" ]; then
              dep ensure -v
            fi
      - save_cache:
          key: go-dep-{{ checksum "Gopkg.lock" }}
          paths:
            - "/go/src/github.com/oinume/algo/vendor"
      - run:
          name: "Install lint tools"
          command: |
            make bootstrap-lint-tools
      - run:
          name: "Run lint"
          command: make lint
      - run:
          name: "Run go test"
          command: |
            go test -v -race -coverprofile=coverage.txt -covermode=atomic ./...
      - run:
          name: "Upload to codecov"
          command: |
            bash <(curl -s https://codecov.io/bash)

Call make lint on CircleCI
Call make lint on CircleCI
