chore: add .drone.yml
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Dawid Wysokiński 2022-11-18 05:52:46 +01:00
parent f483a74719
commit d83aaa5beb
Signed by: Kichiyaki
GPG Key ID: B5445E357FB8B892
1 changed files with 63 additions and 0 deletions

63
.drone.yml Normal file
View File

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