-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
45 lines (33 loc) · 818 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
36
37
38
39
40
41
42
43
44
45
#dirs=./ ./views ./models
dirs=./
.PHONY: atomic backend cover dependencies dev frontend fmt heat test testv
all: frontend backend
dependencies:
cd frontend && npm install
# Rebuild front-end, then run app
dev: frontend
go run .
frontend:
cd frontend && npm run build
backend:
go build .
fmt:
gofmt -w */*.go
test:
go test -cover $(dirs)
testv:
go test -v -cover $(dirs)
cover:
go test -v -coverprofile=coverage.out $(dirs)
go tool cover -html=coverage.out
rm *.out
# Heat maps for coverage. Only need atomic if we start parallelizing things.
# https://blog.golang.org/cover
heat:
go test -v -covermode=count -coverprofile=count.out $(dirs)
go tool cover -html=count.out
rm *.out
atomic:
go test -v -covermode=atomic -coverprofile=atomic.out $(dirs)
go tool cover -html=atomic.out
rm *.out