2023-10-17 19:19:21 +02:00
|
|
|
when:
|
|
|
|
- event: [pull_request, tag, cron]
|
|
|
|
- event: push
|
|
|
|
branch:
|
|
|
|
- ${CI_REPO_DEFAULT_BRANCH}
|
|
|
|
|
2023-01-08 03:53:03 +01:00
|
|
|
variables:
|
2023-10-17 19:19:21 +02:00
|
|
|
- &golang "golang:1.18"
|
2023-01-08 03:53:03 +01:00
|
|
|
|
2023-07-31 05:24:14 +02:00
|
|
|
steps:
|
2023-10-17 19:19:21 +02:00
|
|
|
vendor:
|
2023-01-08 03:53:03 +01:00
|
|
|
image: *golang
|
|
|
|
commands: go mod vendor
|
|
|
|
|
2023-10-17 19:19:21 +02:00
|
|
|
lint:
|
2023-10-25 12:43:48 +02:00
|
|
|
image: golangci/golangci-lint:v1.55-alpine
|
2023-01-08 03:53:03 +01:00
|
|
|
commands: golangci-lint run
|
|
|
|
|
2023-10-17 19:19:21 +02:00
|
|
|
test:
|
2023-01-08 03:53:03 +01:00
|
|
|
image: *golang
|
|
|
|
commands: go test --cover ./...
|