-
Notifications
You must be signed in to change notification settings - Fork 8
/
Makefile
44 lines (35 loc) · 876 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
.PHONY: bench
bench:
@go test -bench=. -benchmem ./...
.PHONY: ut
ut:
@go test -tags=goexperiment.arenas -race ./...
.PHONY: setup
setup:
@sh ./.script/setup.sh
.PHONY: fmt
fmt:
@sh ./.script/goimports.sh
.PHONY: lint
lint:
@golangci-lint run -c .golangci.yml
.PHONY: tidy
tidy:
@go mod tidy -v
.PHONY: check
check:
@$(MAKE) fmt
@$(MAKE) tidy
# e2e 测试
.PHONY: e2e
e2e:
sh ./.script/integrate_test.sh
.PHONY: e2e_up
e2e_up:
docker compose -f .script/integration_test_compose.yml up -d
.PHONY: e2e_down
e2e_down:
docker compose -f .script/integration_test_compose.yml down
mock:
mockgen -copyright_file=.license_header -package=mocks -destination=internal/mocks/pipeline.mock.go github.com/redis/go-redis/v9 Pipeliner
mockgen -copyright_file=.license_header -source=session/types.go -package=session -destination=session/provider.mock_test.go Provider