gouick/.drone.yml
Matthieu 'JP' DERASSE b7915eaae3
All checks were successful
continuous-integration/drone/push Build is passing
fix(drone): Improve telegram message
2022-08-03 14:00:15 +00:00

74 lines
1.4 KiB
YAML

---
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}}** of **`{{repo.name}}`** succeeded.
{{else}}
❌ Build **#{{build.number}}** of **`{{repo.name}}`** failed.
{{/success}}
📝 Commit on **`{{commit.branch}}`**:
``` {{commit.message}} ```
🌐 {{ build.link }}
format: markdown
when:
status:
- failure
- success
volumes:
- name: gopath
temp: {}