forked from graphql-go/handler
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
33 lines (23 loc) · 814 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
GOPATH=$(CURDIR)/.gopath
GOPATHCMD=GOPATH=$(GOPATH)
COVERDIR=$(CURDIR)/.cover
COVERAGEFILE=$(COVERDIR)/cover.out
.PHONY: deps deps-ci coverage coverage-ci test test-watch coverage coverage-html
test:
@${GOPATHCMD} ginkgo --failFast ./...
test-watch:
@${GOPATHCMD} ginkgo watch --debug -cover -r ./...
coverage-ci:
@mkdir -p $(COVERDIR)
@${GOPATHCMD} ginkgo -r -covermode=count --cover --trace ./
@echo "mode: count" > "${COVERAGEFILE}"
@find . -type f -name *.coverprofile -exec grep -h -v "^mode:" {} >> "${COVERAGEFILE}" \; -exec rm -f {} \;
coverage: coverage-ci
@sed -i -e "s|_$(CURDIR)/|./|g" "${COVERAGEFILE}"
coverage-html:
@$(GOPATHCMD) go tool cover -html="${COVERAGEFILE}" -o .cover/report.html
deps:
@mkdir -p ${GOPATH}
@$(GOPATHCMD) go get -v -t ./...
deps-ci:
-go get -v -t ./...