-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTaskfile.yaml
123 lines (114 loc) · 2.66 KB
/
Taskfile.yaml
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
115
116
117
118
119
120
121
122
123
version: "3"
tasks:
install:
desc: "Install dependencies"
cmds:
- task install:aqua
- task install:backend
- task install:frontend
- task install:spec
- task install:example
- task generate
install:aqua:
desc: "Install aqua"
cmds:
- aqua i
install:backend:
desc: "Install backend dependencies"
cmds:
- go mod download
install:frontend:
desc: "Install frontend dependencies"
cmds:
- cd frontend && pnpm install
install:spec:
desc: "Install spec dependencies"
cmds:
- cd spec && pnpm install
install:example:
desc: "Install example dependencies"
cmds:
- cd example && pnpm install
generate:
desc: "Generate codes"
cmds:
- task migrate:up
- cd spec && pnpm compile
- cd frontend && pnpm codegen
- go generate ./...
- task lint
migrate:up:
desc: "Migrate database"
cmds:
- cd atlas && atlas migrate diff {{.CLI_ARGS}} --env local
- cd atlas && atlas migrate apply --env local
- cd atlas && atlas migrate apply --env test
migrate:down:
desc: "Down migrate database"
cmds:
- cd atlas && atlas migrate down --env local
- cd atlas && atlas migrate down --env test
- cd atlas && atlas migrate rm --env local
dev:
desc: "Run development server"
deps:
- task: dev:backend
- task: dev:frontend
- task: dev:spec
- task: dev:example
dev:backend:
desc: "Run development server for backend"
cmds:
- go run cmd/main.go
dev:frontend:
desc: "Run development server for frontend"
cmds:
- cd frontend && pnpm dev
dev:example:
desc: "Run development server for example"
cmds:
- cd example && pnpm dev
dev:spec:
desc: "Run development server for spec"
deps:
- task: dev:spec:dev
- task: dev:spec:doc
dev:spec:dev:
desc: "Watch compile for spec"
cmds:
- cd spec && pnpm dev
dev:spec:doc:
desc: "API doc server for spec"
cmds:
- cd spec && pnpm doc
test:
desc: "Run test"
cmds:
- task test:backend
test:backend:
desc: "Run test for backend"
cmds:
- go test ./...
lint:
desc: "Run lint"
cmds:
- task lint:backend
- task lint:frontend
- task lint:spec
- task lint:example
lint:backend:
desc: "Run lint for backend"
cmds:
- go fmt ./...
lint:frontend:
desc: "Run lint for frontend"
cmds:
- cd frontend && pnpm lint
lint:spec:
desc: "Run lint for spec"
cmds:
- cd spec && pnpm lint
lint:example:
desc: "Run lint for example"
cmds:
- cd example && pnpm lint