🔀 Merge branch 'support/drone' into develop
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Maxim Lebedev 2022-03-19 19:55:54 +05:00
commit 289fb8987d
Signed by: toby3d
GPG Key ID: 1F14E25B7C119FC5
3 changed files with 47 additions and 25 deletions

View File

@ -19,7 +19,10 @@ test:
dep:
go mod download
gen:
go generate ./...
lint:
golangci-lint run
.PHONY: build run clean test dep lint
.PHONY: build run clean test dep gen lint

View File

@ -1,24 +0,0 @@
---
name: default
type: docker
kind: pipeline
steps:
- name: test
image: golang
volumes:
- name: deps
path: /go
commands:
- make test
- name: build
image: golang
volumes:
- name: deps
path: /go
commands:
- make build
depends_on:
- test
volumes:
- name: deps
temp: {}

43
build/ci/drone.yml Normal file
View File

@ -0,0 +1,43 @@
---
kind: pipeline
type: docker
name: default
steps:
- name: init
image: golang:1.18.0-alpine3.14
volumes:
- name: deps
path: /go
commands:
- go mod download
- go generate ./internal/...
- name: test
image: golang:1.18.0-alpine3.14
volumes:
- name: deps
path: /go
environment:
CGO_ENABLED: 0
commands:
- go test -buildvcs=false -v -cover ./...
depends_on:
- init
- name: build
image: golang:1.18.0-alpine3.14
volumes:
- name: deps
path: /go
environment:
CGO_ENABLED: 0
commands:
- go build -buildvcs=false
depends_on:
- init
- test
volumes:
- name: deps
temp: {}