This commit is contained in:
parent
2f6255e2c5
commit
f59b1ceec6
|
@ -25,6 +25,8 @@ steps:
|
|||
image: golang:1.19
|
||||
environment:
|
||||
TESTS_DB_DSN: postgres://postgres:dcbot@database:5432/dcbot?sslmode=disable
|
||||
GOMODCACHE: /drone/src/.cache/test/go-mod
|
||||
GOCACHE: /drone/src/.cache/test/go-build
|
||||
commands:
|
||||
- make generate
|
||||
- go test -race -coverprofile=coverage.txt -covermode=atomic ./...
|
||||
|
@ -85,6 +87,9 @@ steps:
|
|||
- .cache/gomod/go-build
|
||||
- name: check go.mod
|
||||
image: golang:1.19
|
||||
environment:
|
||||
GOMODCACHE: /drone/src/.cache/gomod/go-mod
|
||||
GOCACHE: /drone/src/.cache/gomod/go-build
|
||||
commands:
|
||||
- make generate
|
||||
- go mod tidy
|
||||
|
@ -140,6 +145,10 @@ steps:
|
|||
- .cache/lint/golangci-lint
|
||||
- name: run golangci-lint
|
||||
image: golangci/golangci-lint:v1.50
|
||||
environment:
|
||||
GOMODCACHE: /drone/src/.cache/lint/go-mod
|
||||
GOCACHE: /drone/src/.cache/lint/go-build
|
||||
GOLANGCI_LINT_CACHE: /drone/src/.cache/lint/golangci-lint
|
||||
commands:
|
||||
- make generate
|
||||
- golangci-lint run
|
||||
|
|
Loading…
Reference in New Issue
Block a user