forked from btubbs/pgq
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
35 lines (23 loc) · 749 Bytes
/
Makefile
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
35
.PHONY: tests viewcoverage check dep ci
GOBIN ?= $(GOPATH)/bin
all: tests check
dep: $(GOBIN)/dep
$(GOBIN)/dep ensure -v
tests: dep
go test .
coverage.txt: dep $(GOBIN)/go-acc
go-acc ./... --output=$@
viewcoverage: coverage.txt
go tool cover -html=$<
check: $(GOBIN)/golangci-lint
$(GOBIN)/golangci-lint run --skip-dirs=example
$(GOBIN)/goveralls:
go get -v -u github.com/mattn/goveralls
$(GOBIN)/dep:
go get -v -u github.com/golang/dep/cmd/dep
$(GOBIN)/golangci-lint:
curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(GOPATH)/bin v1.12.3
$(GOBIN)/go-acc:
go get github.com/ory/go-acc
ci: coverage.txt check $(GOBIN)/goveralls
$(GOBIN)/goveralls -coverprofile=$< -service=travis-ci