gouick/.drone.yml

67 lines
1.2 KiB
YAML
Raw Normal View History

2022-08-01 22:06:36 +00:00
---
kind: pipeline
type: docker
name: testing
platform:
os: linux
arch: amd64
steps:
- name: environment
image: golang:1.18
commands:
- go version
- go env
volumes:
- name: gopath
path: /go
- name: tools
image: golang:1.18
commands:
- curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.47.3
- go install github.com/tebeka/go2xunit@latest
- go install github.com/t-yuki/gocover-cobertura@latest
volumes:
- name: gopath
path: /go
- name: lint
image: golang:1.18
commands:
- echo 'Running linting'
- golangci-lint run
volumes:
- name: gopath
path: /go
- name: test
image: golang:1.18
commands:
- go test -cover -v ./...
volumes:
- name: gopath
path: /go
- name: send telegram notification
image: appleboy/drone-telegram
settings:
token:
from_secret: telegram_token
to:
from_secret: telegram_chat_id
message: >
{{#success build.status}}
build {{build.number}} succeeded. Good job.
{{else}}
build {{build.number}} failed. Fix me please.
{{/success}}
when:
status:
- failure
- success
volumes:
- name: gopath
temp: {}