-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathTaskfile.yml
142 lines (123 loc) · 2.77 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
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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
version: '3'
tasks:
default:
desc: 'Default task is to "test" and "build"'
deps:
- test
- build
list:
desc: 'Lists available tasks'
cmds:
- task --list-all
build:
desc: 'Build all'
deps:
- go-build
test:
desc: 'Test all'
deps:
- go-test
clean:
desc: 'Clean all'
cmds:
- rm -f bin/dbn-go-tui-file bin/dbn-go-hist bin/dbn-go-live bin/dbn-go-tui
docker-build:
desc: 'Docker build'
deps:
- go-tidy
cmds:
- docker build .
###############################################################################
go-tidy:
desc: 'Tidy all'
cmds:
- go mod tidy
go-update:
desc: 'Update Go dependencies'
cmds:
- go get -u ./...
go-build:
desc: 'Build Go binaries'
deps:
- build-dbn-go-file
- build-dbn-go-hist
- build-dbn-go-live
- build-dbn-go-tui
build-dbn-go-file:
desc: 'Build dbn-go-file'
deps: [go-tidy]
sources:
- ./*.go
- internal/**/*.go
- cmd/dbn-go-file/*.go
generates:
- bin/dbn-go-file
cmds:
- go build -o bin/dbn-go-file cmd/dbn-go-file/*.go
build-dbn-go-hist:
desc: 'Build dbn-go-hist'
deps: [go-tidy]
sources:
- ./*.go
- hist/*.go
- internal/**/*.go
- cmd/dbn-go-hist/*.go
generates:
- bin/dbn-go-hist
cmds:
- go build -o bin/dbn-go-hist cmd/dbn-go-hist/*.go
test-dbn-go-file:
desc: 'Test dbn-go-file'
deps: [build-dbn-go-file]
cmds:
- DBN_GO_FILE=./bin/dbn-go-file ./tests/exercise_dbn-go-file.sh
- echo $?
test-dbn-go-hist:
desc: 'Test dbn-go-hist'
deps: [build-dbn-go-hist]
cmds:
- DBN_GO_HIST=./bin/dbn-go-hist ./tests/exercise_dbn-go-hist.sh > /dev/null
- echo $?
build-dbn-go-live:
desc: 'Build dbn-go-live'
deps: [go-tidy]
sources:
- ./*.go
- live/*.go
- cmd/dbn-go-live/*.go
generates:
- bin/dbn-go-live
cmds:
- go build -o bin/dbn-go-live cmd/dbn-go-live/*.go
build-dbn-go-tui:
desc: 'Build dbn-go-tui'
deps: [go-tidy]
sources:
- ./*.go
- hist/*.go
- internal/**/*.go
- cmd/dbn-go-tui/*.go
generates:
- bin/dbn-go-tui
cmds:
- go build -o bin/dbn-go-tui cmd/dbn-go-tui/*.go
go-test:
desc: 'Test Go'
deps: [go-tidy]
sources:
- ./*.go
- cmd/dbn-go-file/*.go
- cmd/dbn-go-hist/*.go
- cmd/dbn-go-live/*.go
- cmd/dbn-go-tui/*.go
- hist/*.go
- internal/*.go
- live/*.go
cmds:
- go test ./...
go-test-no-api:
desc: 'Test Go, but no API calls'
deps: [go-tidy]
cmds:
- go test && go test ./live
###############################################################################