forked from mehdihadeli/go-food-delivery-microservices
-
Notifications
You must be signed in to change notification settings - Fork 0
/
taskfile.yml
114 lines (97 loc) · 3.42 KB
/
taskfile.yml
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
106
107
108
109
110
111
112
113
114
#https://taskfile.dev/#/installation
#https://github.com/go-task/task/issues/1115
version: '3'
tasks:
install-tools:
desc: Install necessary tools
cmds:
- sh ./scripts/install-tools.sh
run-catalogs-write-service:
desc: Run catalog write service
cmds:
- sh ./scripts/run.sh catalog_write_service
run-catalog-read-service:
desc: Run catalog read service
cmds:
- sh ./scripts/run.sh catalog_read_service
run-order-service:
desc: Run order service
cmds:
- sh ./scripts/run.sh order_service
build:
desc: Build project components
cmds:
- sh ./scripts/build.sh pkg
- sh ./scripts/build.sh catalog_write_service
- sh ./scripts/build.sh catalog_read_service
- sh ./scripts/build.sh order_service
install-dependencies:
desc: Install project dependencies
cmds:
- sh ./scripts/install-dependencies.sh pkg
- sh ./scripts/install-dependencies.sh catalog_write_service
- sh ./scripts/install-dependencies.sh catalog_read_service
- sh ./scripts/install-dependencies.sh order_service
docker-compose-infra-up:
desc: Start infrastructure using docker-compose
cmds:
- docker-compose -f deployments/docker-compose/docker-compose.infrastructure.yaml up --build -d
docker-compose-infra-down:
desc: Stop infrastructure using docker-compose
cmds:
- docker-compose -f deployments/docker-compose/docker-compose.infrastructure.yaml down
openapi:
desc: Generate OpenAPI documentation
cmds:
- sh ./scripts/openapi.sh catalog_write_service
- sh ./scripts/openapi.sh catalog_read_service
- sh ./scripts/openapi.sh order_service
proto:
desc: Generate protobuf files
cmds:
- sh ./scripts/proto.sh catalog_write_service
- sh ./scripts/proto.sh order_service
unit-test:
desc: Run unit tests
cmds:
- sh ./scripts/test.sh catalog_write_service unit
- sh ./scripts/test.sh catalog_read_service unit
- sh ./scripts/test.sh order_service unit
integration-test:
desc: Run integration tests
cmds:
- sh ./scripts/test.sh catalog_write_service integration
- sh ./scripts/test.sh catalog_read_service integration
- sh ./scripts/test.sh order_service integration
e2e-test:
desc: Run end-to-end tests
cmds:
- sh ./scripts/test.sh catalog_write_service e2e
- sh ./scripts/test.sh catalog_read_service e2e
- sh ./scripts/test.sh order_service e2e
format:
desc: Format codebase
cmds:
- sh ./scripts/format.sh catalog_write_service
- sh ./scripts/format.sh catalog_read_service
- sh ./scripts/format.sh order_service
- sh ./scripts/format.sh pkg
lint:
desc: Run linters
cmds:
- sh ./scripts/lint.sh catalog_write_service
- sh ./scripts/lint.sh catalog_read_service
- sh ./scripts/lint.sh order_service
- sh ./scripts/lint.sh pkg
pkg-mocks:
desc: Generate package mocks
cmds:
- cd internal/pkg/messaging && mockery --output mocks --all
- cd internal/pkg/es && mockery --output mocks --all
- cd internal/pkg/core && mockery --output mocks --all
services-mocks:
desc: Generate service mocks
cmds:
- 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