2020-04-06 22:51:56 +01:00
|
|
|
version: 2.1
|
2021-05-29 22:32:38 +01:00
|
|
|
|
2020-04-03 13:26:06 +01:00
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
docker:
|
2021-05-23 17:33:45 +01:00
|
|
|
- image: cimg/go:1.16
|
2020-04-03 13:26:06 +01:00
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- restore_cache:
|
|
|
|
keys:
|
2021-05-23 17:33:45 +01:00
|
|
|
- go-mod-{{ checksum "go.sum" }}-v3
|
2020-04-03 13:26:06 +01:00
|
|
|
- go-mod-{{ checksum "go.sum" }}
|
|
|
|
- go-mod
|
|
|
|
- run:
|
|
|
|
command: make dist
|
|
|
|
- store_artifacts:
|
2020-04-03 13:38:21 +01:00
|
|
|
path: build
|
2020-04-03 13:26:06 +01:00
|
|
|
- save_cache:
|
2021-05-23 17:33:45 +01:00
|
|
|
key: go-mod-{{ checksum "go.sum" }}-v3
|
2020-04-03 13:26:06 +01:00
|
|
|
paths:
|
2020-04-03 13:53:25 +01:00
|
|
|
- /home/circleci/go/pkg/mod
|
2020-04-03 13:26:06 +01:00
|
|
|
test:
|
|
|
|
docker:
|
2021-05-23 17:33:45 +01:00
|
|
|
- image: cimg/go:1.16
|
2020-04-03 13:26:06 +01:00
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- restore_cache:
|
|
|
|
keys:
|
2021-05-23 17:33:45 +01:00
|
|
|
- go-mod-{{ checksum "go.sum" }}-v3
|
2020-04-03 13:26:06 +01:00
|
|
|
- go-mod-{{ checksum "go.sum" }}
|
|
|
|
- go-mod
|
|
|
|
- run:
|
|
|
|
command: make test
|
|
|
|
workflows:
|
|
|
|
build-and-test:
|
|
|
|
jobs:
|
|
|
|
- test
|
2021-05-29 22:42:24 +01:00
|
|
|
- build:
|
|
|
|
requires:
|
|
|
|
- test
|