-
Notifications
You must be signed in to change notification settings - Fork 47
/
Makefile
43 lines (34 loc) · 895 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
# 单元测试
.PHONY: ut
ut:
@go test -race ./...
.PHONY: setup
setup:
@sh ./.script/setup.sh
.PHONY: lint
lint:
golangci-lint run
.PHONY: fmt
fmt:
@sh ./.script/fmt.sh
.PHONY: tidy
tidy:
@go mod tidy -v
.PHONY: check
check:
@$(MAKE) --no-print-directory fmt
@$(MAKE) --no-print-directory tidy
# e2e 测试
.PHONY: e2e
e2e:
sh ./.script/integrate_test.sh
.PHONY: e2e_up
e2e_up:
docker compose -p webook -f .script/integration_test_compose.yml up -d
.PHONY: e2e_down
e2e_down:
docker compose -p webook -f .script/integration_test_compose.yml down -v
.PHONY: mock
mock:
@mockgen -destination=internal/test/mocks/session_provider.mock.go -package=mocks -typed=true github.com/ecodeclub/ginx/session Provider
@mockgen -destination=internal/test/mocks/session.mock.go -package=mocks -typed=true github.com/ecodeclub/ginx/session Session