-
Notifications
You must be signed in to change notification settings - Fork 132
/
Taskfile.yaml
124 lines (110 loc) · 3.2 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
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
# https://taskfile.dev
version: "3"
tasks:
dev:
aliases: [d]
desc: |
Builds and Deploys MultiJuicer to the default kubernetes context.
Then forwards the balancer service to localhost:8080
cmds:
- ./build-and-deploy.sh
- kubectl rollout status deployment balancer
- kubectl port-forward deployment/balancer 8080:8080
build:
aliases: [b]
cmds:
- task: balancer:ui:build
lint:
aliases: [l]
cmds:
- task: cleaner:lint
- task: balancer:api:lint
- task: progress-watchdog:lint
test:
aliases: [t]
cmds:
- task: helm:test
- task: balancer:ui:test
- task: balancer:api:test
- task: cleaner:test
- task: progress-watchdog:test
balancer:ui:build:
preconditions:
- sh: test -d node_modules/
msg: "balancer ui dependencies are not installed. run 'npm ci' in balancer/ui/ to install them."
cmds:
- npm run build
dir: balancer/ui/
balancer:ui:test:
preconditions:
- sh: test -d node_modules/
msg: "balancer ui dependencies are not installed. run 'npm ci' in balancer/ui/ to install them."
cmds:
- |
# run with bun if installed, otherwise use npm
if command -v bun &> /dev/null; then
bun run test -- --run
else
npm test -- --run
fi
dir: balancer/ui/
balancer:api:test:
preconditions:
- sh: test -f ui/build/index.html
msg: "juice balancer ui needs to be compiled for the api tests to work properly. run 'task build' to compile it."
cmds:
- go test ./...
dir: balancer/
balancer:api:lint:
preconditions:
- sh: which staticcheck
msg: "staticcheck needs to be installed for running the balancer api linter."
cmds:
- go vet ./...
- staticcheck ./...
dir: balancer/
progress-watchdog:test:
preconditions:
- sh: which go
msg: "go needs to be installed for running the progress-watchdog tests."
cmds:
- go test ./...
dir: progress-watchdog/
progress-watchdog:lint:
preconditions:
- sh: which staticcheck
msg: "staticcheck needs to be installed for running the progress-watchdog linter."
cmds:
- go vet ./...
- staticcheck ./...
dir: progress-watchdog/
cleaner:test:
cmds:
- go test ./...
dir: cleaner/
cleaner:lint:
preconditions:
- sh: which staticcheck
msg: "staticcheck needs to be installed for running the cleaner linter."
cmds:
- go vet ./...
- staticcheck ./...
dir: cleaner/
helm:test:
preconditions:
- sh: helm version
msg: "helm is not installed: https://helm.sh/"
- sh: helm unittest --help
msg: "helm unittest plugin is not installed: https://github.com/helm-unittest/helm-unittest/"
cmds:
- helm unittest .
dir: helm/multi-juicer/
helm:test:update-snapshots:
preconditions:
- sh: helm version
msg: "helm is not installed: https://helm.sh/"
- sh: helm unittest --help
msg: "helm unittest plugin is not installed: https://github.com/helm-unittest/helm-unittest/"
cmds:
- helm unittest . --update-snapshot
dir: helm/multi-juicer/