version: 2.1 jobs: build: working_directory: ~/repo docker: - image: circleci/golang:1.15.8 steps: - checkout - restore_cache: keys: - go-mod-v4-{{ checksum "go.sum" }} - run: name: Install Dependencies command: go mod download - save_cache: key: go-mod-v4-{{ checksum "go.sum" }} paths: - "/go/pkg/mod" - run: name: Install golangci-lint command: | curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh \ | sh -s -- -b "$(go env GOPATH)/bin" v1.51.2 - run: name: Run tests command: make ci-test - run: name: Upload coverage report command: bash <(curl -s https://codecov.io/bash)