-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathTaskfile.yml
More file actions
105 lines (87 loc) · 2.06 KB
/
Copy pathTaskfile.yml
File metadata and controls
105 lines (87 loc) · 2.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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
version: "3"
tasks:
default:
desc: List available tasks
silent: true
cmds:
- task --list
deps:
desc: Download Go module dependencies
cmds:
- go mod download
tidy:
desc: Tidy Go modules
cmds:
- go mod tidy
fmt:
desc: Format Go code
cmds:
- gofmt -w ./cmd ./internal ./tests
fmt:check:
desc: Check Go formatting
cmds:
- |
unformatted="$(gofmt -l ./cmd ./internal ./tests)"
if [ -n "$unformatted" ]; then
echo "$unformatted"
exit 1
fi
vet:
desc: Run go vet
cmds:
- go vet ./...
test:
desc: Run unit tests
cmds:
- go test ./...
test:integration:
desc: Run Docker-backed integration tests
cmds:
- go test -tags=integration -v -timeout=3m ./tests/integration/
bench:
desc: Run benchmarks
cmds:
- go test -bench=. -benchmem ./...
check:
desc: Run formatting check, vet, and unit tests
cmds:
- task: fmt:check
- task: vet
- task: test
build:
desc: Build the CDC handler binary
cmds:
- go build -o ./bin/cdc-handler ./cmd/cdc-handler
run:
desc: Run the CDC handler with local defaults
cmds:
- |
DATABASE_URL="${DATABASE_URL:-postgres://postgres:postgres@localhost:5432/postgres}" \
CDC_SLOT_NAME="${CDC_SLOT_NAME:-better_cdc_slot}" \
CDC_PLUGIN="${CDC_PLUGIN:-wal2json}" \
CDC_PUBLICATIONS="${CDC_PUBLICATIONS:-better_cdc_pub}" \
go run ./cmd/cdc-handler
up:
desc: Start local Docker Compose stack
cmds:
- docker compose up -d
down:
desc: Stop local Docker Compose stack
cmds:
- docker compose down
logs:
desc: Follow Docker Compose logs
cmds:
- docker compose logs -f
ps:
desc: Show Docker Compose service status
cmds:
- docker compose ps
load-test:
desc: Run the E2E load test; pass options after --
cmds:
- ./scripts/e2e-load-test.sh {{.CLI_ARGS}}
clean:
desc: Remove local build artifacts
cmds:
- rm -rf ./bin