mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-05-06 22:18:28 +00:00
Try to run coverage only on go1.2.
This commit is contained in:
+1
-1
@@ -13,4 +13,4 @@ install:
|
|||||||
- go get launchpad.net/gocheck
|
- go get launchpad.net/gocheck
|
||||||
|
|
||||||
|
|
||||||
script: make test
|
script: make travis
|
||||||
@@ -1,10 +1,30 @@
|
|||||||
prepare:
|
GOVERSION=$(shell go version | awk '{print $$3;}')
|
||||||
|
|
||||||
|
ifeq ($(TRAVIS), yes)
|
||||||
|
GOVERALLS?=$(HOME)/gopath/bin/goveralls
|
||||||
|
else
|
||||||
|
GOVERALLS?=goveralls
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(GOVERSION), go1.2)
|
||||||
|
TRAVIS_TARGET=coveralls
|
||||||
|
PREPARE_LIST=cover-prepare
|
||||||
|
else
|
||||||
|
TRAVIS_TARGET=test
|
||||||
|
PREPARE_LIST=
|
||||||
|
endif
|
||||||
|
|
||||||
|
all: test check
|
||||||
|
|
||||||
|
prepare: $(PREPARE_LIST)
|
||||||
go get -d -v ./...
|
go get -d -v ./...
|
||||||
go get launchpad.net/gocheck
|
go get launchpad.net/gocheck
|
||||||
go get github.com/axw/gocov/gocov
|
|
||||||
|
cover-prepare:
|
||||||
go get github.com/golang/lint/golint
|
go get github.com/golang/lint/golint
|
||||||
go get github.com/matm/gocov-html
|
go get github.com/matm/gocov-html
|
||||||
go get github.com/mattn/goveralls
|
go get github.com/mattn/goveralls
|
||||||
|
go get code.google.com/p/go.tools/cmd/cover
|
||||||
|
|
||||||
coverage:
|
coverage:
|
||||||
gocov test ./... | gocov-html > coverage.html
|
gocov test ./... | gocov-html > coverage.html
|
||||||
@@ -14,5 +34,12 @@ check:
|
|||||||
go tool vet -all=true .
|
go tool vet -all=true .
|
||||||
golint .
|
golint .
|
||||||
|
|
||||||
|
travis: $(TRAVIS_TARGET)
|
||||||
|
|
||||||
test:
|
test:
|
||||||
go test -v ./...
|
go test -v ./...
|
||||||
|
|
||||||
|
coveralls:
|
||||||
|
$(GOVERALLS) -service travis-ci.org -package="./..." $(COVERALLS_TOKEN)
|
||||||
|
|
||||||
|
.PHONY: prepare cover-prepare coverage check test coveralls travis
|
||||||
Reference in New Issue
Block a user