-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yml
More file actions
52 lines (47 loc) · 1.65 KB
/
Taskfile.yml
File metadata and controls
52 lines (47 loc) · 1.65 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
version: '3'
vars:
VECTORS_DIR: tests/community-test-vectors
VERSION: 0.0.6
tasks:
version:
cmds:
- echo {{.VERSION}}
libpub:
cmds:
- git push origin
- git tag v{{.VERSION}}
- git push --tags
- GOPROXY=proxy.golang.org go list -m github.com/synadia-labs/cbor.go@v{{.VERSION}}
fetch-vectors:
desc: Clone or update community CBOR test-vectors into testdata
sources:
- tests/community-test-vectors/appendix_a.json
generates:
- tests/community-test-vectors/appendix_a.json
cmds:
- |
if [ -d "{{.VECTORS_DIR}}/.git" ]; then
echo "Updating existing test-vectors in {{.VECTORS_DIR}}";
git -C "{{.VECTORS_DIR}}" pull --ff-only;
else
echo "Cloning cbor/test-vectors into {{.VECTORS_DIR}}";
git clone https://github.com/cbor/test-vectors "{{.VECTORS_DIR}}";
fi
test:
desc: Run all tests in root and cborgen modules
deps:
- fetch-vectors
cmds:
- go test ./...
fuzz:
desc: Run Go fuzz tests across runtime, JSON interop, and structs packages
deps:
- fetch-vectors
env:
FUZZ_TIME: '{{default "5s" .ENV.FUZZ_TIME}}'
cmds:
- go test ./tests/runtime-compliance -run=^$ -fuzz=FuzzRuntimeReaderBasic -fuzztime=$FUZZ_TIME
- go test ./tests/structs -run=^$ -fuzz=FuzzDecodeSafeTrusted -fuzztime=$FUZZ_TIME
- go test ./tests/community-test-vectors -run=^$ -fuzz=FuzzCommunityVectors -fuzztime=$FUZZ_TIME
- go test ./tests/runtime-sequences -run=^$ -fuzz=FuzzCBORSequences -fuzztime=$FUZZ_TIME
- go test ./tests/json-interop -run=^$ -fuzz=FuzzJSONInterop -fuzztime=$FUZZ_TIME