-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathMakefile
More file actions
49 lines (34 loc) · 918 Bytes
/
Makefile
File metadata and controls
49 lines (34 loc) · 918 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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
default: test
RELEASE_DEPS=test fmt lint examples readme
include release.mk
ALL_SOURCES := $(shell find . -type f -name '*.go')
.PHONY: fmt lint test cover coverhtml examples readme
test:
go test -timeout=60s $(shell go list ./... | grep -v "/examples")
@echo "< ALL TESTS PASS >"
update-deps: go.mod
GOPROXY=direct go get -u ./...
go mod tidy
deps: go.mod
go mod download
fmt:
go fmt ./...
coverage.out: $(ALL_SOURCES)
go test -coverprofile=coverage.out $(shell go list ./... | grep -v examples)
cover: coverage.out
go tool cover -func=coverage.out
coverhtml: coverage.out
go tool cover -html=coverage.out
lint:
golangci-lint run ./...
benchmark:
./run_benchmarks.sh
examples:
@for dir in examples/*/; do \
if [ -f "$$dir"*.go ]; then \
echo "Running example in $$dir"; \
(cd "$$dir" && go run *.go > /dev/null); \
fi; \
done
readme:
go run examples/update_readme_examples.go