gouick/.drone.yml
Matthieu 'JP' DERASSE d7560ce8d6
Some checks failed
continuous-integration/drone/push Build is failing
fix(drone): revert change
2022-08-05 14:21:45 +00:00

83 lines
1.6 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: tidy
image: golang:1.18
commands:
- go mod tidy
- git diff --exit-code -- go.mod go.sum
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: {}