-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
.drone.yml
34 lines (34 loc) · 1.19 KB
/
.drone.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# Run the below command when you edit .drone.yml
# drone secure --repo haya14busa/gosum --in .drone.sec.yaml
#
build:
test:
image: golang
commands:
- go get -d -v -t ./...
- go test -v ./...
lint:
image: golang
environment:
- REVIEWDOG_GITHUB_API_TOKEN=$$REVIEWDOG_GITHUB_API_TOKEN
commands:
- go get github.com/haya14busa/reviewdog/cmd/reviewdog
- go get github.com/golang/lint/golint
- go get honnef.co/go/unused/cmd/unused
- go get github.com/kisielk/errcheck
- go get honnef.co/go/staticcheck/cmd/staticcheck
- go get honnef.co/go/simple/cmd/gosimple
- |
go tool vet -all -shadowstrict . 2>&1 | reviewdog -f=govet -ci=droneio
- |
golint ./... | reviewdog -f=golint -ci=droneio
- |
unused ./... | reviewdog -efm="%f:%l:%c: %m" -name=unused -ci=droneio
- |
errcheck -asserts -ignoretests -blank ./... | reviewdog -efm="%f:%l:%c:%m" -name=errcheck -ci=droneio
- |
staticcheck ./... | reviewdog -efm="%f:%l:%c: %m" -name=staticcheck -ci=droneio
- |
gosimple ./... | reviewdog -efm="%f:%l:%c: %m" -name=gosimple -ci=droneio
when:
event: pull_request