forked from luraproject/lura
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
46 lines (38 loc) · 1.41 KB
/
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
36
37
38
39
40
41
42
43
44
45
46
.PHONY: all deps test build benchmark coveralls
DEP_VERSION=0.4.1
OS := $(shell uname | tr '[:upper:]' '[:lower:]')
all: deps test build
prepare:
@echo "Installing dep..."
@curl -L -s https://github.com/golang/dep/releases/download/v${DEP_VERSION}/dep-${OS}-amd64 -o ${GOPATH}/bin/dep
@chmod a+x ${GOPATH}/bin/dep
deps:
@echo "Setting up the vendors folder..."
@dep ensure -v
@echo ""
@echo "Resolved dependencies:"
@dep status
@echo ""
test:
go test -cover -race ./...
benchmark:
@echo "Proxy middleware stack"
@go test -bench=BenchmarkProxyStack -benchtime=3s ./proxy
@echo "Proxy middlewares"
@go test -bench="BenchmarkNewLoadBalanced|BenchmarkNewConcurrent|BenchmarkNewRequestBuilder|BenchmarkNewMergeData" -benchtime=3s ./proxy
@echo "Response manipulation"
@echo "Response property whitelisting"
@go test -bench=BenchmarkEntityFormatter_whitelistingFilter -benchtime=3s ./proxy
@echo "Response property blacklisting"
@go test -bench=BenchmarkEntityFormatter_blacklistingFilter -benchtime=3s ./proxy
@echo "Response property groupping"
@go test -bench=BenchmarkEntityFormatter_grouping -benchtime=3s ./proxy
@echo "Response property mapping"
@go test -bench=BenchmarkEntityFormatter_mapping -benchtime=3s ./proxy
@echo "Request generator"
@go test -bench=BenchmarkRequestGeneratePath -benchtime=3s ./proxy
build:
go build ./...
coveralls: all
go get github.com/mattn/goveralls
sh coverage.sh --coveralls