mirror of
https://github.com/sipeed/picoclaw.git
synced 2026-07-28 01:27:58 +00:00
fix(integration): docker runner workspace mounts and go command path
This commit is contained in:
@@ -2,9 +2,9 @@ services:
|
|||||||
integration-runner:
|
integration-runner:
|
||||||
image: golang:1.25-bookworm
|
image: golang:1.25-bookworm
|
||||||
working_dir: /workspace
|
working_dir: /workspace
|
||||||
entrypoint: ["bash", "-lc"]
|
entrypoint: ["bash", "-c"]
|
||||||
volumes:
|
volumes:
|
||||||
- .:/workspace
|
- ${INTEGRATION_REPO_ROOT}:/workspace
|
||||||
- picoclaw-integration-gocache:/go-build-cache
|
- picoclaw-integration-gocache:/go-build-cache
|
||||||
- picoclaw-integration-gomodcache:/go-mod-cache
|
- picoclaw-integration-gomodcache:/go-mod-cache
|
||||||
environment:
|
environment:
|
||||||
|
|||||||
@@ -1,14 +1,9 @@
|
|||||||
services:
|
services:
|
||||||
integration-runner:
|
integration-runner:
|
||||||
image: golang:1.25-bookworm
|
|
||||||
depends_on:
|
depends_on:
|
||||||
mcp-streamable-server:
|
mcp-streamable-server:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
volumes:
|
|
||||||
- .:/src
|
|
||||||
working_dir: /src
|
|
||||||
environment:
|
environment:
|
||||||
PATH: "/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
|
|
||||||
PICOCLAW_MCP_REAL_SERVER_JSON: >-
|
PICOCLAW_MCP_REAL_SERVER_JSON: >-
|
||||||
{"enabled":true,"type":"http","url":"http://mcp-streamable-server:8080/mcp"}
|
{"enabled":true,"type":"http","url":"http://mcp-streamable-server:8080/mcp"}
|
||||||
PICOCLAW_MCP_REAL_TOOL_NAME: echo
|
PICOCLAW_MCP_REAL_TOOL_NAME: echo
|
||||||
@@ -18,7 +13,7 @@ services:
|
|||||||
|
|
||||||
mcp-streamable-server:
|
mcp-streamable-server:
|
||||||
build:
|
build:
|
||||||
context: .
|
context: ${INTEGRATION_REPO_ROOT}
|
||||||
dockerfile: integration/fixtures/mcp-streamable-server/Dockerfile
|
dockerfile: integration/fixtures/mcp-streamable-server/Dockerfile
|
||||||
environment:
|
environment:
|
||||||
STREAMABLE_JSON_RESPONSE: "true"
|
STREAMABLE_JSON_RESPONSE: "true"
|
||||||
|
|||||||
@@ -63,6 +63,7 @@ run_suite() {
|
|||||||
# shellcheck disable=SC1090
|
# shellcheck disable=SC1090
|
||||||
source "$manifest"
|
source "$manifest"
|
||||||
set +a
|
set +a
|
||||||
|
export INTEGRATION_REPO_ROOT="$ROOT_DIR"
|
||||||
|
|
||||||
: "${TEST_COMMAND:?suite $suite_name must define TEST_COMMAND in $manifest}"
|
: "${TEST_COMMAND:?suite $suite_name must define TEST_COMMAND in $manifest}"
|
||||||
runner_service="${RUNNER_SERVICE:-integration-runner}"
|
runner_service="${RUNNER_SERVICE:-integration-runner}"
|
||||||
@@ -91,7 +92,7 @@ run_suite() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
echo "==> [$suite_name] running: $TEST_COMMAND"
|
echo "==> [$suite_name] running: $TEST_COMMAND"
|
||||||
# integration-runner already uses `bash -lc` as its entrypoint, so pass the
|
# integration-runner already uses `bash -c` as its entrypoint, so pass the
|
||||||
# suite command as a single argument for Bash to execute directly.
|
# suite command as a single argument for Bash to execute directly.
|
||||||
docker compose "${compose_args[@]}" run --rm "$runner_service" "$TEST_COMMAND"
|
docker compose "${compose_args[@]}" run --rm "$runner_service" "$TEST_COMMAND"
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user