commit
73d6e8af84
2 changed files with 21 additions and 6 deletions
24
.drone.yml
24
.drone.yml
|
@ -1,14 +1,28 @@
|
||||||
image: dmp42/go:stable
|
image: dmp42/go:stable
|
||||||
|
|
||||||
script:
|
script:
|
||||||
|
# To be spoofed back into the test image
|
||||||
|
- go get github.com/modocache/gover
|
||||||
|
|
||||||
- go get -t ./...
|
- go get -t ./...
|
||||||
|
|
||||||
- FAIL=$(find ./ -iname "*.go" -exec gofmt -s -l {} \;) && echo "$FAIL" && test -z "$FAIL"
|
# Go fmt
|
||||||
|
- test -z "$(gofmt -s -l -w . | tee /dev/stderr)"
|
||||||
|
# Go lint
|
||||||
|
- test -z "$(golint ./... | tee /dev/stderr)"
|
||||||
|
# Go vet
|
||||||
- go vet ./...
|
- go vet ./...
|
||||||
- FAIL=$(golint ./...) && echo "$FAIL" && test -z "$FAIL"
|
# Go test
|
||||||
- go test -v ./...
|
- go test -v -race -cover ./...
|
||||||
- goveralls -v -service drone.io -repotoken {{COVERALLS_TOKEN}}
|
# Helper to concatenate reports
|
||||||
# - go build --tags SOMETAG
|
- gover
|
||||||
|
# Send to coverall
|
||||||
|
- goveralls -service drone.io -coverprofile=gover.coverprofile -repotoken {{COVERALLS_TOKEN}}
|
||||||
|
|
||||||
|
# Do we want these as well?
|
||||||
|
# - go get code.google.com/p/go.tools/cmd/goimports
|
||||||
|
# - test -z "$(goimports -l -w ./... | tee /dev/stderr)"
|
||||||
|
# http://labix.org/gocheck
|
||||||
|
|
||||||
notify:
|
notify:
|
||||||
email:
|
email:
|
||||||
|
|
|
@ -6,6 +6,7 @@ ENV GOROOT /usr/local/go
|
||||||
ENV PATH $PATH:$GOROOT/bin:$GOPATH/bin
|
ENV PATH $PATH:$GOROOT/bin:$GOPATH/bin
|
||||||
|
|
||||||
ENV LANG C
|
ENV LANG C
|
||||||
|
ENG LC_ALL C
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y \
|
RUN apt-get update && apt-get install -y \
|
||||||
wget ca-certificates git mercurial bzr \
|
wget ca-certificates git mercurial bzr \
|
||||||
|
@ -16,4 +17,4 @@ RUN wget https://golang.org/dl/go$GOLANG_VERSION.linux-amd64.tar.gz --quiet && \
|
||||||
tar -C /usr/local -xzf go$GOLANG_VERSION.linux-amd64.tar.gz && \
|
tar -C /usr/local -xzf go$GOLANG_VERSION.linux-amd64.tar.gz && \
|
||||||
rm go${GOLANG_VERSION}.linux-amd64.tar.gz
|
rm go${GOLANG_VERSION}.linux-amd64.tar.gz
|
||||||
|
|
||||||
RUN go get github.com/axw/gocov/gocov github.com/mattn/goveralls github.com/golang/lint/golint
|
RUN go get github.com/axw/gocov/gocov github.com/mattn/goveralls github.com/golang/lint/golint
|
||||||
|
|
Loading…
Reference in a new issue