forked from mehdihadeli/go-food-delivery-microservices
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
105 lines (87 loc) · 3.06 KB
/
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
.PHONY: install-tools
install-tools:
@./scripts/install-tools.sh
.PHONY: run-catalogs-write-service
run-catalogs-write-service:
@./scripts/run.sh catalog_write_service
.PHONY: run-catalog-read-service
run-catalog-read-service:
@./scripts/run.sh catalog_read_service
.PHONY: run-order-service
run-order-service:
@./scripts/run.sh order_service
.PHONY: build
build:
@./scripts/build.sh pkg
@./scripts/build.sh catalog_write_service
@./scripts/build.sh catalog_read_service
@./scripts/build.sh order_service
.PHONY: install-dependencies
install-dependencies:
@./scripts/install-dependencies.sh pkg
@./scripts/install-dependencies.sh catalog_write_service
@./scripts/install-dependencies.sh catalog_read_service
@./scripts/install-dependencies.sh order_service
.PHONY: docker-compose-infra-up
docker-compose-infra-up:
@docker-compose -f deployments/docker-compose/docker-compose.infrastructure.yaml up --build -d
docker-compose-infra-down:
@docker-compose -f deployments/docker-compose/docker-compose.infrastructure.yaml down
.PHONY: openapi
openapi:
@./scripts/openapi.sh catalog_write_service
@./scripts/openapi.sh catalog_read_service
@./scripts/openapi.sh order_service
# https://stackoverflow.com/questions/13616033/install-protocol-buffers-on-windows
.PHONY: proto
proto:
@./scripts/proto.sh catalog_write_service
@./scripts/proto.sh order_service
.PHONY: unit-test
unit-test:
@./scripts/test.sh catalog_write_service unit
@./scripts/test.sh catalog_read_service unit
@./scripts/test.sh order_service unit
.PHONY: integration-test
integration-test:
@./scripts/test.sh catalog_write_service integration
@./scripts/test.sh catalog_read_service integration
@./scripts/test.sh order_service integration
.PHONY: e2e-test
e2e-test:
@./scripts/test.sh catalog_write_service e2e
@./scripts/test.sh catalog_read_service e2e
@./scripts/test.sh order_service e2e
#.PHONY: load-test
#load-test:
# @./scripts/test.sh catalogs_write load-test
# @./scripts/test.sh catalogs_read load-test
# @./scripts/test.sh orders load-test
.PHONY: format
format:
@./scripts/format.sh catalog_write_service
@./scripts/format.sh catalog_read_service
@./scripts/format.sh order_service
@./scripts/format.sh pkg
.PHONY: lint
lint:
@./scripts/lint.sh catalog_write_service
@./scripts/lint.sh catalog_read_service
@./scripts/lint.sh order_service
@./scripts/lint.sh pkg
#.PHONY: c4
#c4:
# cd tools/c4 && go mod tidy && sh generate.sh
# https://medium.com/yemeksepeti-teknoloji/mocking-an-interface-using-mockery-in-go-afbcb83cc773
# https://vektra.github.io/mockery/latest/running/
# https://amitshekhar.me/blog/test-with-testify-and-mockery-in-go
.PHONY: pkg-mocks
pkg-mocks:
cd internal/pkg/messaging && mockery --output mocks --all
cd internal/pkg/es && mockery --output mocks --all
cd internal/pkg/core && mockery --output mocks --all
.PHONY: services-mocks
services-mocks:
cd internal/services/catalog_write_service && mockery --output mocks --all
cd internal/services/catalog_read_service && mockery --output mocks --all
cd internal/services/order_service && mockery --output mocks --all