-
Notifications
You must be signed in to change notification settings - Fork 4
/
Taskfile.yml
39 lines (38 loc) · 1.21 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
version: "3"
tasks:
dbdocs:
desc: Build database documentation
cmds:
- dbdocs build docs/database.dbml
migrateup:
desc: Migrate up the database schema
cmds:
- migrate -database ${POSTGRESQL_URL} -path internal/database/migrations up
migratedown:
desc: Migrate down the database schema
cmds:
- migrate -database ${POSTGRESQL_URL} -path internal/database/migrations down
lint:
desc: Check code for programmatic and stylistic errors
cmds:
- golangci-lint run
build:
desc: Compile code
cmds:
- go build -o bin/app cmd/main.go
run:
desc: Run compiled code
deps: [build]
cmds:
- ./bin/app
test:
desc: Run all tests ignoring cache
cmds:
- go test -cover -v ./... -count=1
mock:
desc: Generate mock from interface
cmds:
- |
~/go/bin/mockgen -source=internal/ports/usecase/user_usecase.go -destination=internal/mock/user_usecase.go -package=mock
~/go/bin/mockgen -source=internal/ports/usecase/book_usecase.go -destination=internal/mock/book_usecase.go -package=mock
~/go/bin/mockgen -source=internal/ports/usecase/loan_usecase.go -destination=internal/mock/loan_usecase.go -package=mock