chore: add .drone.yml
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
f483a74719
commit
d83aaa5beb
|
@ -0,0 +1,63 @@
|
|||
---
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: test
|
||||
|
||||
steps:
|
||||
- name: test
|
||||
image: golang:1.19
|
||||
environment:
|
||||
TESTS_DB_DSN: postgres://postgres:sessions@database:5432/sessions?sslmode=disable
|
||||
commands:
|
||||
- go test -race -coverprofile=coverage.txt -covermode=atomic ./...
|
||||
|
||||
services:
|
||||
- name: database
|
||||
image: postgres:14.5
|
||||
environment:
|
||||
POSTGRES_DB: sessions
|
||||
POSTGRES_PASSWORD: sessions
|
||||
|
||||
trigger:
|
||||
event:
|
||||
- push
|
||||
- pull_request
|
||||
branch:
|
||||
- master
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: check-go-mod
|
||||
|
||||
steps:
|
||||
- name: check go.mod
|
||||
image: golang:1.19
|
||||
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: run golangci-lint
|
||||
image: golangci/golangci-lint:v1.50
|
||||
commands:
|
||||
- golangci-lint run
|
||||
|
||||
trigger:
|
||||
event:
|
||||
- push
|
||||
- pull_request
|
||||
branch:
|
||||
- master
|
Loading…
Reference in New Issue