Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ pnpm gates # every app check CI runs, one line per gate w
(cd <project> && uv run pytest) # each Python project under plugins/ or integrations/ the PR touches
```

`scripts/ci/gates.sh` lists the gates; a failed gate's line names its log.
`scripts/ci/gates.sh` lists the gates; a failed gate's line names its log. It runs one at a time per machine: a second run prints a `wait` line and starts when the first ends.
`uv run pytest` is needed only for the Python projects the PR touches;
`docs/agent-guide/plugins.md` lists the full per-project check.

Expand Down
16 changes: 16 additions & 0 deletions scripts/ci/gates.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,22 @@
# Runs every app check CI runs, one line per gate with its exit code; a failed gate names its log ($GATES_LOG_DIR, else a temp dir).
set -u
cd "$(dirname "$0")/../.."
# One run per machine: parallel runs from several worktrees starve each other into test timeouts.
lock="/tmp/yui-gates-$(id -u).lock"
until mkdir "$lock" 2>/dev/null; do
holder="$(cat "$lock/pid" 2>/dev/null)"
if [ -n "$holder" ] && ! kill -0 "$holder" 2>/dev/null; then
rm -rf "$lock"
continue
fi
if [ -z "${waiting:-}" ]; then
echo "wait another gates run holds the lock (pid ${holder:-?})"
waiting=1
fi
sleep 5
done
echo $$ >"$lock/pid"
trap 'rm -rf "$lock"' EXIT
gates=(
"pnpm test"
"pnpm typecheck:test"
Expand Down
Loading