2023-10-17 19:19:21 +02:00
|
|
|
when:
|
|
|
|
- event: [pull_request, tag, cron]
|
|
|
|
- event: push
|
|
|
|
branch:
|
|
|
|
- ${CI_REPO_DEFAULT_BRANCH}
|
2023-11-08 20:04:23 +01:00
|
|
|
- 'renovate/*'
|
2023-10-17 19:19:21 +02:00
|
|
|
|
2023-01-08 03:53:03 +01:00
|
|
|
variables:
|
2024-02-08 11:36:05 +01:00
|
|
|
- &golang "golang:1.22"
|
2024-06-02 14:06:57 +02:00
|
|
|
- &golangci-lint "golangci/golangci-lint:v1.59-alpine"
|
2024-06-08 02:05:34 +02:00
|
|
|
- &reviewdog-golangci-lint "woodpeckerci/plugin-reviewdog-golangci-lint:1.59"
|
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
|
|
|
|
|
2024-03-30 16:52:30 +01:00
|
|
|
review-go:
|
|
|
|
image: *reviewdog-golangci-lint
|
|
|
|
settings:
|
|
|
|
token:
|
|
|
|
from_secret: reviewdog_token
|
|
|
|
when:
|
|
|
|
event: pull_request
|
|
|
|
|
2023-10-17 19:19:21 +02:00
|
|
|
lint:
|
2024-03-30 16:52:30 +01:00
|
|
|
image: *golangci-lint
|
2024-06-02 14:06:57 +02:00
|
|
|
commands: golangci-lint run --timeout 5m
|
2024-03-30 16:52:30 +01:00
|
|
|
when:
|
|
|
|
event: [push, tag, cron]
|
2023-01-08 03:53:03 +01:00
|
|
|
|
2023-10-17 19:19:21 +02:00
|
|
|
test:
|
2023-01-08 03:53:03 +01:00
|
|
|
image: *golang
|
|
|
|
commands: go test --cover ./...
|