* ci: add PR wrapper command surface * ci: collect wrapper timing in PR checks * docs: record initial CI wrapper measurements * ci: add manual measurement workflow * ci: allow branch measurement dispatch * ci: keep measuring independent commands after failures * docs: record branch-dispatched CI measurement * ci: keep measuring package suites after failures * docs: record CI measurement batch * fix: repair CI-measured test failures * test: make local Go gates hermetic * ci: add sharded integration measurement lane * test: fix internal beads integration TestMain * docs: record fixed integration shard measurement * ci: add hybrid integration sharding measurement * ci: speed up cmd/bd test shard discovery * ci: add 16-way integration sharding measurement * ci: measure prebuilt cmd bd sharding * docs: record prebuilt sharding measurement * docs: design CI build artifact stage * docs: record repeat prebuilt integration measurement * ci: add build artifact stage * ci: reuse build artifact in linux test lane * ci: promote main linux integration shards * ci: gate legacy platform tests to main * ci: satisfy workflow shell lint * ci: ignore archived migrations in duplicate check * ci: add package gate wrappers * test: clean up testing short boundaries * ci: allow unreleased version docs lag * ci: gate releases on package checks * ci: split workflow by tier * ci: add aggregate PR gates
71 lines
1.3 KiB
Bash
Executable file
71 lines
1.3 KiB
Bash
Executable file
#!/usr/bin/env bash
|
|
# MCP Python package gate.
|
|
|
|
set -euo pipefail
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
REPO_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
|
|
MCP_DIR="$REPO_ROOT/integrations/beads-mcp"
|
|
|
|
# shellcheck source=../../.buildflags
|
|
source "$REPO_ROOT/.buildflags"
|
|
# shellcheck source=lib/timing.sh
|
|
source "$REPO_ROOT/scripts/ci/lib/timing.sh"
|
|
|
|
tmpdir=""
|
|
cleanup() {
|
|
if [[ -n "$tmpdir" ]]; then
|
|
rm -rf "$tmpdir"
|
|
fi
|
|
}
|
|
trap cleanup EXIT
|
|
|
|
prepare_bd_binary() {
|
|
tmpdir="$(mktemp -d)"
|
|
local target="$tmpdir/bd"
|
|
|
|
if [[ -n "${BEADS_TEST_BD_BINARY:-}" ]]; then
|
|
cp "$BEADS_TEST_BD_BINARY" "$target"
|
|
else
|
|
go build -o "$target" ./cmd/bd
|
|
fi
|
|
|
|
chmod +x "$target"
|
|
export PATH="$tmpdir:$PATH"
|
|
bd version
|
|
}
|
|
|
|
mcp_uv_sync() {
|
|
cd "$MCP_DIR"
|
|
uv sync --all-groups --locked
|
|
}
|
|
|
|
mcp_ruff() {
|
|
cd "$MCP_DIR"
|
|
uv run ruff check src/beads_mcp tests
|
|
}
|
|
|
|
mcp_mypy() {
|
|
cd "$MCP_DIR"
|
|
uv run mypy src/beads_mcp
|
|
}
|
|
|
|
mcp_pytest() {
|
|
cd "$MCP_DIR"
|
|
uv run pytest --durations=50
|
|
}
|
|
|
|
mcp_build() {
|
|
cd "$MCP_DIR"
|
|
rm -rf dist
|
|
uv build
|
|
}
|
|
|
|
cd "$REPO_ROOT"
|
|
|
|
ci_time "prepare bd for MCP package" -- prepare_bd_binary
|
|
ci_time "mcp uv sync" -- mcp_uv_sync
|
|
ci_time "mcp ruff check" -- mcp_ruff
|
|
ci_time "mcp mypy" -- mcp_mypy
|
|
ci_time "mcp pytest" -- mcp_pytest
|
|
ci_time "mcp build" -- mcp_build
|