sessions/.drone.yml
Dawid Wysokiński d83aaa5beb
All checks were successful
continuous-integration/drone/push Build is passing
chore: add .drone.yml
2022-11-18 05:52:46 +01:00

63 lines
975 B
YAML

---
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