-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add proper Drone config, README and fix issues (ineff/errcheck)
- Loading branch information
Paul Lhussiez
committed
Aug 22, 2019
1 parent
300fb9e
commit 1660561
Showing
8 changed files
with
89 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,59 @@ | ||
workspace: | ||
base: /go | ||
path: src/github.com/Depado/smallblog/ | ||
--- | ||
kind: pipeline | ||
name: default | ||
|
||
pipeline: | ||
prerequisites: | ||
image: golang:1.10 | ||
commands: | ||
- go get -u github.com/golang/dep/cmd/dep | ||
- dep ensure | ||
steps: | ||
- name: fetch | ||
image: docker:git | ||
commands: | ||
- git fetch --tags | ||
|
||
test: | ||
image: golang:1.10 | ||
commands: | ||
- bash coverage.sh | ||
|
||
codecov: | ||
image: robertstettner/drone-codecov | ||
secrets: [ codecov_token ] | ||
- name: test | ||
image: golang:latest | ||
volumes: | ||
- name: deps | ||
path: /go | ||
commands: | ||
- go test -race -coverprofile=coverage.txt -covermode=atomic | ||
environment: | ||
GO111MODULE: "on" | ||
|
||
- name: linter | ||
image: golang:latest | ||
volumes: | ||
- name: deps | ||
path: /go | ||
commands: | ||
- curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s v1.17.1 | ||
- ./bin/golangci-lint run | ||
environment: | ||
GO111MODULE: "on" | ||
|
||
- name: coverage | ||
image: plugins/codecov | ||
settings: | ||
token: | ||
from_secret: codecov_token | ||
files: | ||
- coverage.txt | ||
|
||
- name: telegram | ||
image: appleboy/drone-telegram | ||
settings: | ||
to: 790376882 | ||
format: markdown | ||
token: | ||
from_secret: telegram_token | ||
message: > | ||
*{{repo.name}}* | ||
[Build {{build.number}}]({{build.link}}) by {{commit.author}} {{#success build.status}}succeeded{{else}}failed{{/success}} in {{buildtime build.started}} | ||
`{{truncate commit.sha 8}}`: "{{commit.message}}" | ||
when: | ||
status: | ||
- success | ||
- failure | ||
|
||
volumes: | ||
- name: deps | ||
host: | ||
path: /var/lib/cache/godeps/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters