-
Notifications
You must be signed in to change notification settings - Fork 32
Expand file tree
/
Copy pathMakefile
More file actions
75 lines (63 loc) · 2.21 KB
/
Makefile
File metadata and controls
75 lines (63 loc) · 2.21 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
SHELL := /bin/bash
.PHONY: lint fmt test-docker test-a2a test-mcp sync-all-uv sync-a2a sync-mcp test-startup-all test-startup-a2a test-startup-mcp
lint:
pre-commit run --all-files
fmt:
ruff format .
ruff check --fix .
# This builds all of the A2A and MCP example Docker images to verify they can be built successfully.
test-docker: test-a2a test-mcp
# Verify all of the A2A example Docker images can be built
# (Optional KAGENTI_DOCKER_FLAGS for docker build, e.g. --no-cache or --load)
test-a2a:
@for f in $(shell find a2a -mindepth 1 -maxdepth 1 -type d); do \
pushd $${f} || exit; \
echo "Building Docker image for $${f}..."; \
docker build ${KAGENTI_DOCKER_FLAGS} --tag $${f##*/} . || exit; \
popd; \
done
# Verify all of the MCP example Docker images can be built
# (Optional KAGENTI_DOCKER_FLAGS for docker build, e.g. --no-cache or --load)
test-mcp:
@for f in $(shell find mcp -mindepth 1 -maxdepth 1 -type d); do \
pushd $${f} || exit; \
echo "Building Docker image for $${f}..."; \
docker build ${KAGENTI_DOCKER_FLAGS} --tag $${f##*/} . || exit; \
popd; \
done
# After changing pyproject.toml, run this to sync dependencies for all examples
sync-all-uv: sync-a2a sync-mcp
sync-a2a:
@for f in $(shell find a2a -mindepth 1 -maxdepth 1 -type d); do \
pushd $${f} || exit; \
echo "Syncing dependencies for $${f}..."; \
uv sync --no-dev || exit; \
popd; \
done
sync-mcp:
@for f in $(shell find mcp -mindepth 1 -maxdepth 1 -type d); do \
pushd $${f} || exit; \
echo "Syncing dependencies for $${f}..."; \
uv sync --no-dev || exit; \
popd; \
done
test-startup-all: test-startup-a2a test-startup-mcp
# Run the test_startup.exp script for each A2A example that has one to verify it starts successfully.
test-startup-a2a:
@for f in $(shell find a2a -mindepth 1 -maxdepth 1 -type d); do \
pushd $${f} || exit; \
if [ -f test_startup.exp ]; then \
echo "Testing startup for $${f}..."; \
expect -f test_startup.exp || exit; \
fi; \
popd; \
done
test-startup-mcp:
@for f in $(shell find mcp -mindepth 1 -maxdepth 1 -type d); do \
pushd $${f} || exit; \
if [ -f test_startup.exp ]; then \
echo "Testing startup for $${f}..."; \
expect -f test_startup.exp || exit; \
fi; \
popd; \
done