feat: migrate from drone to woodpecker
ci/woodpecker/push/test Pipeline was successful
Details
ci/woodpecker/push/test Pipeline was successful
Details
This commit is contained in:
parent
b01466c6df
commit
8b9ae0b7fa
54
.drone.yml
54
.drone.yml
|
@ -1,54 +0,0 @@
|
|||
---
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: test
|
||||
|
||||
steps:
|
||||
- name: test
|
||||
image: golang:1.20
|
||||
commands:
|
||||
- go test -race -coverprofile=coverage.txt -covermode=atomic ./...
|
||||
|
||||
trigger:
|
||||
event:
|
||||
- push
|
||||
- pull_request
|
||||
branch:
|
||||
- master
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: check-go-mod
|
||||
|
||||
steps:
|
||||
- name: go.mod
|
||||
image: golang:1.20
|
||||
commands:
|
||||
- go mod tidy
|
||||
- git diff --exit-code go.mod
|
||||
|
||||
trigger:
|
||||
event:
|
||||
- push
|
||||
- pull_request
|
||||
branch:
|
||||
- master
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: golangci-lint
|
||||
|
||||
steps:
|
||||
- name: golangci-lint
|
||||
image: golangci/golangci-lint:v1.52
|
||||
commands:
|
||||
- golangci-lint run
|
||||
|
||||
trigger:
|
||||
event:
|
||||
- push
|
||||
- pull_request
|
||||
branch:
|
||||
- master
|
|
@ -57,6 +57,16 @@ linters-settings:
|
|||
line-length: 150
|
||||
gocyclo:
|
||||
min-complexity: 10
|
||||
depguard:
|
||||
rules:
|
||||
main:
|
||||
files:
|
||||
- "$all"
|
||||
deny:
|
||||
- pkg: reflect
|
||||
desc: Please don't use reflect package
|
||||
- pkg: github.com/pkg/errors
|
||||
desc: Should be replaced by standard lib errors package
|
||||
govet:
|
||||
enable:
|
||||
- asmdecl
|
||||
|
@ -106,3 +116,9 @@ issues:
|
|||
linters:
|
||||
- dupl
|
||||
- gocyclo
|
||||
- linters:
|
||||
- lll
|
||||
source: "^//go:generate "
|
||||
- linters:
|
||||
- lll
|
||||
source: "^// @Param"
|
||||
|
|
|
@ -0,0 +1,31 @@
|
|||
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
|
Loading…
Reference in New Issue