2022-03-27 19:18:45 +02:00
|
|
|
pipeline:
|
2022-03-27 19:23:49 +02:00
|
|
|
# use vendor to cache dependencies
|
|
|
|
vendor:
|
|
|
|
image: golang
|
|
|
|
commands:
|
|
|
|
- go mod vendor
|
|
|
|
|
2022-03-27 19:18:45 +02:00
|
|
|
lint:
|
2022-03-27 19:40:18 +02:00
|
|
|
image: golangci/golangci-lint:v1.45.2
|
2022-03-27 19:18:45 +02:00
|
|
|
commands:
|
2022-03-27 19:40:18 +02:00
|
|
|
- go version
|
2022-03-27 19:35:06 +02:00
|
|
|
- go install mvdan.cc/gofumpt@latest
|
|
|
|
- "[ $(gofumpt -extra -l . | wc -l) != 0 ] && { echo 'code not formated'; exit 1; }"
|
2022-03-27 19:40:18 +02:00
|
|
|
- golangci-lint run -v
|
2022-03-27 19:18:45 +02:00
|
|
|
|
2022-03-27 19:35:06 +02:00
|
|
|
# # TODO: make tests work
|
|
|
|
# test:
|
|
|
|
# image: golang
|
|
|
|
# commands:
|
|
|
|
# - go test ./...
|
2022-03-27 19:18:45 +02:00
|
|
|
|
|
|
|
build:
|
|
|
|
image: golang
|
|
|
|
commands:
|
|
|
|
- go build
|