forked from lab259/go-graphql-struct
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
35 lines (25 loc) · 865 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
GOPATH=$(CURDIR)/../../../../
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 -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}"
@cp "${COVERAGEFILE}" coverage.txt
coverage-html:
@$(GOPATHCMD) go tool cover -html="${COVERAGEFILE}" -o .cover/report.html
dep-ensure:
@$(GOPATHCMD) dep ensure -v
vet:
@$(GOPATHCMD) go vet ./...
fmt:
@$(GOPATHCMD) go fmt ./...