| 1 |
version: 2.1 |
| 2 |
|
| 3 |
jobs: |
| 4 |
build: |
| 5 |
working_directory: ~/repo |
| 6 |
docker: |
| 7 |
- image: circleci/golang:1.15.8 |
| 8 |
steps: |
| 9 |
- checkout |
| 10 |
- restore_cache: |
| 11 |
keys: |
| 12 |
- go-mod-v4-{{ checksum "go.sum" }} |
| 13 |
- run: |
| 14 |
name: Install Dependencies |
| 15 |
command: go mod download |
| 16 |
- save_cache: |
| 17 |
key: go-mod-v4-{{ checksum "go.sum" }} |
| 18 |
paths: |
| 19 |
- "/go/pkg/mod" |
| 20 |
- run: |
| 21 |
name: Install golangci-lint |
| 22 |
command: | |
| 23 |
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh \ |
| 24 |
| sh -s -- -b "$(go env GOPATH)/bin" v1.51.2 |
| 25 |
- run: |
| 26 |
name: Run tests |
| 27 |
command: make ci-test |
| 28 |
- run: |
| 29 |
name: Upload coverage report |
| 30 |
command: bash <(curl -s https://codecov.io/bash) |