go-plugin/.woodpecker/lint.yaml

35 lines
701 B
YAML
Raw Permalink 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.62-alpine"
- &reviewdog-golangci-lint "woodpeckerci/plugin-reviewdog-golangci-lint:1.61"
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 ./...