-
Notifications
You must be signed in to change notification settings - Fork 0
/
Taskfile.yml
86 lines (72 loc) · 1.75 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
version: '3'
# global environmental variables
env:
DEBUG: 1
SHOW: 1
tasks:
default:
deps: [build, test]
desc: Builds and tests all components
help:
cmds:
- cmd: "go-task --list"
silent: true
# # run this task before each other task
# build tasks
build:
desc: Builds the backend
cmds:
- cmd: echo "Building ..."
silent: true
- task: build_sqlite
- task: build_memory
- task: build_client
build_sqlite:
desc: Builds sqlite server
cmds:
- cmd: echo "Build sqlite server"
silent: true
- cmd: go build -o ./bin/sqlite ./cmd/sqlite/sqlite_server.go
build_memory:
desc: Builds memory server
cmds:
- cmd: echo "Build memory server"
silent: true
- cmd: go build -o ./bin/memory ./cmd/memory/memory_server.go
build_client:
desc: Builds client
cmds:
- cmd: echo "Build client"
silent: true
- cmd: go build -o ./bin/client ./cmd/client.go
# test tasks
test:
desc: Tests project
cmds:
- cmd: echo "Testing project"
silent: true
- cmd: go test -p 1 -count=1 -cover -coverprofile=unit.coverage.out ./...
start_memory:
desc: Starts memory server
cmds:
- cmd: echo "Starting memory server"
silent: true
- task: build_memory
- cmd: ./bin/memory
start_sqlite:
desc: Starts sqlite server
env:
MIGRATIONS:
sh: echo "$(pwd)/migrations"
cmds:
- cmd: echo "Starting sqlite server in folder"
silent: true
- task: build_sqlite
- cmd: ./bin/sqlite
start_client:
desc: Starts client
cmds:
- cmd: echo "Starting client"
silent: true
- task: build_client
- cmd: ./bin/client