This repository has been archived on 2024-02-27. You can view files and clone it, but cannot push or open issues or pull requests.
gootp/.woodpecker/test.yml

32 lines
548 B
YAML

when:
- event: [pull_request]
- event: push
branch:
- ${CI_REPO_DEFAULT_BRANCH}
variables:
- &go_image 'golang:1.21'
steps:
test:
image: *go_image
group: test
pull: true
commands:
- go test -race -coverprofile=coverage.txt -covermode=atomic ./...
lint:
image: golangci/golangci-lint:v1.54
pull: true
group: test
commands:
- golangci-lint run
check-go-mod:
image: *go_image
group: test
pull: true
commands:
- go mod tidy
- git diff --exit-code go.mod