-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yml
More file actions
42 lines (38 loc) · 954 Bytes
/
Taskfile.yml
File metadata and controls
42 lines (38 loc) · 954 Bytes
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
version: "3"
tasks:
lint:
desc: Run golangci-lint
cmds:
- golangci-lint run ./...
lint-fix:
desc: Run golangci-lint with auto-fixes
cmds:
- golangci-lint run --fix ./...
test:
desc: Run tests
cmds:
- go test -race ./...
fuzz:
desc: Run fuzz tests (default 30s per test, use FUZZ_TIME to override)
vars:
FUZZ_TIME: '{{default "30s" .FUZZ_TIME}}'
cmds:
- |
exit_code=0
targets=(
"FuzzParseScript"
"FuzzParseExpressions"
"FuzzEvalExpressions"
"FuzzParseTagFilters"
"FuzzCommandString"
)
for target in "${targets[@]}"; do
echo "=== ${target} ==="
if go test -run "^$" -fuzz="${target}" -fuzztime={{.FUZZ_TIME}} .; then
echo "PASS: ${target}"
else
echo "FAIL: ${target}"
exit_code=1
fi
done
exit $exit_code