forked from braintree-go/braintree-go
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
26 lines (19 loc) · 776 Bytes
/
Makefile
File metadata and controls
26 lines (19 loc) · 776 Bytes
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
.PHONY: hooks unit
SHELL:=/bin/bash
hooks: .git/hooks/prepare-commit-msg
.git/hooks/prepare-commit-msg: .githooks/prepare-commit-msg
mkdir -p .git/hooks
cp $< $@
test:
go test -parallel 15 -tags='unit integration' ./...
unit:
go test -tags=unit ./...
integration:
go test -parallel 15 -tags=integration ./...
analysis:
diff -u <(echo -n) <(go list -f '{{range .TestGoFiles}}{{$$.ImportPath}}/{{.}}{{end}}' ./...) \
|| (exit_code=$$?; echo -e '\033[31mTest files should be marked with a unit or integration build tag.\033[0m'; exit $$exit_code)
diff -u <(echo -n) <(gofmt -d .) \
|| (exit_code=$$?; echo -e '\033[31mRun gofmt to format source files.\033[0m'; exit $$exit_code)
go vet ./...
go get github.com/kisielk/errcheck && CGO_ENABLED=0 errcheck ./...