-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
46 lines (36 loc) · 750 Bytes
/
Copy pathMakefile
File metadata and controls
46 lines (36 loc) · 750 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
.PHONY: test lint build clean examples coverage fmt deps
# default target
all: test lint build
# run tests
test:
go test -v -race -coverprofile=coverage.out ./...
# run linter
lint:
golangci-lint run
# Build library
build:
go build -v ./...
# build examples
examples:
cd examples/basic && go build -v
cd examples/custom && go build -v
cd examples/bm25f && go build -v
cd examples/tokenizer && go build -v
# Clean build artifacts
clean:
go clean
rm -f coverage.out
find examples -type f -perm +111 -delete
# TODO: run benchmarks
# bench:
# go test -bench=. -benchmem ./...
# check coverage
coverage: test
go tool cover -html=coverage.out
# format code
fmt:
go fmt ./...
# install dependencies
deps:
go mod download
go mod tidy