go-plugin/.woodpecker.yaml

35 lines
701 B
YAML
Raw Normal View History

when:
- event: [pull_request, tag, cron]
- event: push
branch:
- ${CI_REPO_DEFAULT_BRANCH}
2023-11-08 20:04:23 +01:00
- 'renovate/*'
2023-01-08 03:53:03 +01:00
variables:
- &golang "golang:1.23"
- &golangci-lint "golangci/golangci-lint:v1.59-alpine"
- &reviewdog-golangci-lint "woodpeckerci/plugin-reviewdog-golangci-lint:1.59"
2023-01-08 03:53:03 +01:00
steps:
vendor:
2023-01-08 03:53:03 +01:00
image: *golang
commands: go mod vendor
review-go:
image: *reviewdog-golangci-lint
settings:
token:
from_secret: reviewdog_token
when:
event: pull_request
lint:
image: *golangci-lint
commands: golangci-lint run --timeout 5m
when:
event: [push, tag, cron]
2023-01-08 03:53:03 +01:00
test:
2023-01-08 03:53:03 +01:00
image: *golang
commands: go test --cover ./...