mirror of
https://codeberg.org/woodpecker-plugins/go-plugin.git
synced 2024-11-24 22:35:39 +01:00
35 lines
701 B
YAML
35 lines
701 B
YAML
when:
|
|
- event: [pull_request, tag, cron]
|
|
- event: push
|
|
branch:
|
|
- ${CI_REPO_DEFAULT_BRANCH}
|
|
- 'renovate/*'
|
|
|
|
variables:
|
|
- &golang "golang:1.23"
|
|
- &golangci-lint "golangci/golangci-lint:v1.62-alpine"
|
|
- &reviewdog-golangci-lint "woodpeckerci/plugin-reviewdog-golangci-lint:1.59"
|
|
|
|
steps:
|
|
vendor:
|
|
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]
|
|
|
|
test:
|
|
image: *golang
|
|
commands: go test --cover ./...
|