Repository navigation
Expand file tree
/
Copy pathTaskfile.yaml
More file actions
73 lines (62 loc) · 1.94 KB
/
Copy pathTaskfile.yaml
File metadata and controls
73 lines (62 loc) · 1.94 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
version: "3"
tasks:
fmt:
desc: Format code with ruff
cmds:
- uv run ruff check --fix .
- uv run ruff format .
proto:gen:
desc: Generate Python protobuf and gRPC stubs
cmds:
- uv run python -m grpc_tools.protoc -Isrc --python_out=src --grpc_python_out=src --pyi_out=src src/govec/proto/govec.proto
fmt:check:
desc: Check formatting and types (ruff + ty)
aliases:
- check
- fmt-check
cmds:
- uv run ruff check .
- uv run ty check
- uv run ruff format --check --diff .
test:
desc: Run unit tests (no server required)
aliases:
- test:unit
cmd: uv run pytest
server:health:
desc: Check GoVec server is running on localhost:9697
cmd: curl -sf http://localhost:9697/health
grpc:health:
desc: Check the GoVec gRPC server is listening on localhost:9698
cmd: nc -z localhost 9698
# The two aggregates below just chain the leaf tasks -- each leaf owns the
# precondition for the server it needs, so there is one place to change it.
test:e2e:
desc: Run all e2e tests, REST and gRPC
aliases:
- test:e
- test:e2e:local
cmds:
- task: test:e2e:rest
- task: test:e2e:grpc
test:all:
desc: Run every test, unit and e2e
cmds:
- task: test
- task: test:e2e
test:e2e:rest:
desc: Run REST e2e tests only (requires govec server on localhost:9697)
aliases:
- test:rest
preconditions:
- sh: curl -sf http://localhost:9697/health
msg: "GoVec server is not running on localhost:9697"
cmd: uv run pytest tests/govec/e2e/rest -m e2e -v
test:e2e:grpc:
desc: Run gRPC e2e tests only (requires govec with GOVEC_GRPC_ENABLED=true on :9698)
aliases:
- test:grpc
preconditions:
- sh: nc -z localhost 9698
msg: "GoVec gRPC server is not listening on localhost:9698 (set GOVEC_GRPC_ENABLED=true)"
cmd: uv run pytest tests/govec/e2e/grpc -m e2e -v