-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTaskfile.yaml
44 lines (36 loc) · 1 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
version: "3"
dotenv: ['.env']
tasks:
run:
aliases:
- r
env:
DB_HOST: localhost
cmds:
- go run cmd/main.go
migrateup:
cmds:
- migrate -database "postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB}?sslmode=${POSTGRES_SSL_MODE}" -path internal/app/storage/postgres/migrations/ up
migratedown:
cmds:
- migrate -database "postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB}?sslmode=${POSTGRES_SSL_MODE}" -path internal/app/storage/postgres/migrations/ down
test:
aliases:
- t
cmds:
- go test ./...
coverge:
aliases:
- c
cmds:
- go test -coverprofile=coverage.out ./...
- go tool cover -html=coverage.out -o coverage.html
- xdg-open coverage.html
rmcov:
cmds:
- rm coverage.out coverage.html
swaginit:
aliases:
- sw
cmds:
- swag init --outputTypes go,yaml -g cmd/main.go internal/model