-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yaml
More file actions
90 lines (74 loc) · 3.06 KB
/
Copy pathTaskfile.yaml
File metadata and controls
90 lines (74 loc) · 3.06 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
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
version: '3'
vars:
CGO_FLAGS: 'CGO_LDFLAGS="-L/opt/homebrew/opt/icu4c@78/lib" CGO_CPPFLAGS="-I/opt/homebrew/opt/icu4c@78/include" CGO_CFLAGS="-I/opt/homebrew/opt/icu4c@78/include"'
GO_ENV: 'GONOSUMDB=github.com/nustiueudinastea/*'
DOCKER_IMAGE: doltswarmdemo
NR_INSTANCES: '{{.NR_INSTANCES | default "5"}}'
tasks:
build:
desc: Build the ddolt binary
cmds:
- '{{.GO_ENV}} {{.CGO_FLAGS}} go build -o ddolt .'
test:
desc: Run all tests locally
vars:
TIMEOUT: '{{.TIMEOUT | default "30m"}}'
cmds:
- '{{.GO_ENV}} {{.CGO_FLAGS}} NR_INSTANCES={{.NR_INSTANCES}} go test -v -timeout {{.TIMEOUT}} ./...'
test:integration:
desc: Run only the integration test
cmds:
- '{{.GO_ENV}} {{.CGO_FLAGS}} NR_INSTANCES={{.NR_INSTANCES}} ENABLE_INIT_PROCESS_OUTPUT=true go test -v -timeout 10m -run TestIntegration'
test:sequential:
desc: Run sequential writes propagation test
cmds:
- '{{.GO_ENV}} {{.CGO_FLAGS}} NR_INSTANCES={{.NR_INSTANCES}} go test -v -timeout 10m -run TestSequentialWritesPropagation'
test:concurrent:
desc: Run concurrent writes test
cmds:
- '{{.GO_ENV}} {{.CGO_FLAGS}} NR_INSTANCES={{.NR_INSTANCES}} go test -v -timeout 10m -run TestConcurrentWrites'
test:order:
desc: Run commit order consistency test
cmds:
- '{{.GO_ENV}} {{.CGO_FLAGS}} NR_INSTANCES={{.NR_INSTANCES}} go test -v -timeout 10m -run TestCommitOrderConsistency'
docker:build:
desc: Build Docker image (includes doltswarm library)
cmds:
- ./build-docker.sh
docker:test:containers:
desc: Run tests with each peer in a Docker container (build image first with docker:build)
cmds:
- '{{.GO_ENV}} {{.CGO_FLAGS}} NR_INSTANCES={{.NR_INSTANCES}} go test -tags docker -v -timeout 15m -run TestDockerIntegration'
docker:test:
desc: Build Docker image and run integration test
cmds:
- ./build-docker.sh
- '{{.GO_ENV}} {{.CGO_FLAGS}} NR_INSTANCES={{.NR_INSTANCES}} go test -tags docker -v -timeout 15m -run TestDockerIntegration'
docker:test:concurrent:
desc: Run concurrent writes test with Docker containers (build image first with docker:build)
cmds:
- '{{.GO_ENV}} {{.CGO_FLAGS}} NR_INSTANCES={{.NR_INSTANCES}} go test -tags docker -v -timeout 15m -run TestDockerConcurrentWrites'
docker:shell:
desc: Open a shell in the Docker container
cmds:
- docker run --rm -it {{.DOCKER_IMAGE}} /bin/bash
docker:clean:
desc: Clean up Docker test containers and networks
cmds:
- docker ps -a --filter "label=doltswarmdemo-test" -q | xargs -r docker rm -f || true
- docker network rm doltswarmdemo-test || true
- docker images --filter "reference=doltswarmdemo-initialized*" -q | xargs -r docker rmi -f || true
clean:
desc: Clean up test artifacts and processes
cmds:
- pkill -9 -f ddolt || true
- rm -rf temp/tst* || true
- rm -f ddolt || true
kill:
desc: Kill all running ddolt processes
cmds:
- pkill -9 -f ddolt || true
default:
desc: Show available tasks
cmds:
- task --list