-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathMakefile
56 lines (45 loc) · 1.76 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
47
48
49
50
51
52
53
54
55
56
default: lint test
lint:
golint ./... | egrep -v -f lint.ignores || true
test:
go test -cover -v ./...
deps-dev:
go get github.com/golang/lint/golint
go get gopkg.in/check.v1
go get golang.org/x/tools/cmd/cover
go get github.com/modocache/gover
go get golang.org/x/sys/unix
deps-dev-u:
go get -u github.com/golang/lint/golint
go get -u gopkg.in/check.v1
go get -u golang.org/x/tools/cmd/cover
go get -u github.com/modocache/gover
go get -u golang.org/x/sys/unix
ci: lint doctor test coveralls
check-go-imports:
go get golang.org/x/tools/cmd/goimports
goimports -w .
git diff --exit-code .
doctor: check-go-imports
# send coverage data to coveralls
coveralls: run-cover
go get github.com/mattn/goveralls
goveralls -coverprofile=.coverprofiles/gover.coverprofile -service=travis-ci || true
run-cover: clean-cover
mkdir -p .coverprofiles
go test -coverprofile=.coverprofiles/tree.coverprofile ./tree
go test -coverprofile=.coverprofiles/checker.coverprofile ./checker
go test -coverprofile=.coverprofiles/constants.coverprofile ./constants
go test -coverprofile=.coverprofiles/emulator.coverprofile ./emulator
go test -coverprofile=.coverprofiles/parser.coverprofile ./parser
go test -coverprofile=.coverprofiles/precompilation.coverprofile ./precompilation
go test -coverprofile=.coverprofiles/simplifier.coverprofile ./simplifier
go test -coverprofile=.coverprofiles/unifier.coverprofile ./unifier
go test -coverprofile=.coverprofiles/compiler.coverprofile ./compiler
go test -coverprofile=.coverprofiles/main.coverprofile
gover .coverprofiles .coverprofiles/gover.coverprofile
clean-cover:
$(RM) -rf .coverprofiles
# generats an HTML report with coverage information
cover: run-cover
go tool cover -html=.coverprofiles/gover.coverprofile