2022-03-27 19:54:06 +00:00
|
|
|
pipeline:
|
|
|
|
# use vendor to cache dependencies
|
|
|
|
vendor:
|
2022-06-10 13:27:17 +00:00
|
|
|
image: golang:1.18
|
2022-03-27 19:54:06 +00:00
|
|
|
commands:
|
|
|
|
- go mod vendor
|
|
|
|
|
|
|
|
lint:
|
|
|
|
image: golangci/golangci-lint:v1.45.2
|
|
|
|
commands:
|
|
|
|
- go version
|
|
|
|
- go install mvdan.cc/gofumpt@latest
|
|
|
|
- "[ $(gofumpt -extra -l . | wc -l) != 0 ] && { echo 'code not formated'; exit 1; }"
|
2022-05-10 16:14:28 +00:00
|
|
|
- golangci-lint run --timeout 5m
|
2022-03-27 19:54:06 +00:00
|
|
|
|
2022-03-30 19:31:09 +00:00
|
|
|
test:
|
2022-06-10 13:27:17 +00:00
|
|
|
image: golang:1.18
|
2022-03-30 19:31:09 +00:00
|
|
|
commands:
|
|
|
|
- go test ./...
|
2022-03-27 19:54:06 +00:00
|
|
|
|
|
|
|
build:
|
2022-06-10 13:27:17 +00:00
|
|
|
image: golang:1.18
|
2022-03-27 19:54:06 +00:00
|
|
|
commands:
|
|
|
|
- go build
|