-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yaml
More file actions
67 lines (57 loc) · 1.52 KB
/
Taskfile.yaml
File metadata and controls
67 lines (57 loc) · 1.52 KB
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
version: "3"
dotenv:
- ".env"
tasks:
test:
dotenv:
- ".env.test"
desc: runs tests
cmds:
- task: db-migrate-tests
- |
if [ -z "{{ .CLI_ARGS }}" ]; then
go test -timeout 30s --count=1 -v ./... | grep -v "\[no test files\]"
else
go test -timeout 30s --count=1 -v -run {{ .CLI_ARGS }}
fi
localization-download:
desc: Download latest localization files
cmd: tolgee pull
db-generate:
desc: generate models from database schema
cmd: go generate ./internal/database
db-migrate:
desc: generate migrations
cmds:
- echo "Generating migrations"
- task: db-migrate-hash
- atlas migrate diff --env local
db-migrate-hash:
desc: generate migrations
cmds:
- atlas migrate hash --env local
db-migrate-apply:
desc: apply migrations using atlas
cmds:
# variables will be pulled from global vars declaration unless overwritten in the task call
- echo "Applying migrations to $DATABASE_HOST/$DATABASE_NAME"
- atlas migrate apply --env local
db-migrate-tests:
desc: apply migrations using atlas
dotenv:
- ".env.test"
cmds:
- atlas migrate apply --env local
assets-generate:
desc: generate static assets
cmds:
- go generate ./internal/assets
- go generate ./cmd/frontend/assets/generate
dev:
desc: Start a local dev server
cmds:
- air
dev-web:
desc: Start a local web server for frontend only
cmds:
- air -c .air.web.toml