426e9eeabd
Voice Workbench / headless workbench (mocked backends) (push) Has been cancelled
Voice Workbench / real acoustic lane (nightly, provisioned only) (push) Has been cancelled
ci / test (push) Has been cancelled
ci / lint-and-format (push) Has been cancelled
ci / build (push) Has been cancelled
ci / dev-startup (push) Has been cancelled
gitleaks / gitleaks (push) Has been cancelled
Markdown Links / Relative Markdown Links (push) Has been cancelled
Quality (Extended) / Homepage Build (PR smoke) (push) Has been cancelled
Quality (Extended) / Comment-only diff guard (push) Has been cancelled
Quality (Extended) / Format + Type Safety Ratchet (push) Has been cancelled
Quality (Extended) / Develop Gate (secret scan + UI determinism) (push) Has been cancelled
Quality (Extended) / Develop Gate (lint) (push) Has been cancelled
Chat shell gestures / Chat shell gesture + parity e2e (push) Has been cancelled
Cloud Gateway Discord / Test (push) Has been cancelled
Benchmark Bridge Tests / benchmark (bunx @biomejs/biome check packages/lifeops-bench/src, benchmark-lint) (push) Has been cancelled
Benchmark Bridge Tests / benchmark (bunx vitest run --config packages/lifeops-bench/vitest.config.ts --root packages/lifeops-bench --passWithNoTests, benchmark-tests) (push) Has been cancelled
Build Agent Image / build-and-push (push) Has been cancelled
Dev Smoke / bun run dev onboarding chat (push) Has been cancelled
Dev Smoke / Vite HMR dependency-level smoke (push) Has been cancelled
Electrobun Submodule Guard / electrobun gitlink is fetchable (push) Has been cancelled
Publish @elizaos/example-code / check_npm (push) Has been cancelled
Publish @elizaos/example-code / publish_npm (push) Has been cancelled
Publish @elizaos/plugin-elizacloud / verify_version (push) Has been cancelled
Publish @elizaos/plugin-elizacloud / publish_npm (push) Has been cancelled
Sandbox Live Smoke / Sandbox live smoke (push) Has been cancelled
Snap Build & Test / Build Snap (amd64) (push) Has been cancelled
Snap Build & Test / Build Snap (arm64) (push) Has been cancelled
Test Packaging / elizaos CLI global-install smoke (node + bun) (push) Has been cancelled
Cloud Gateway Webhook / Test (push) Has been cancelled
Cloud Tests / lint-and-types (push) Has been cancelled
Cloud Tests / unit-tests (push) Has been cancelled
Cloud Tests / integration-tests (push) Has been cancelled
Cloud Tests / e2e-tests (push) Has been cancelled
CodeQL Advanced / Analyze (javascript-typescript) (push) Has been cancelled
Deploy Apps Worker (Product 2) / Determine environment (push) Has been cancelled
Deploy Apps Worker (Product 2) / Deploy apps worker to apps-control host (${{ needs.determine-env.outputs.environment }}) (push) Has been cancelled
Deploy Eliza Provisioning Worker / Determine environment (push) Has been cancelled
Deploy Eliza Provisioning Worker / Deploy worker to Hetzner host (${{ needs.determine-env.outputs.environment }} @ ${{ needs.determine-env.outputs.deployment_sha }}) (push) Has been cancelled
Dev Smoke / Classify changed paths (push) Has been cancelled
supply-chain / sbom (push) Has been cancelled
supply-chain / vulnerability-scan (push) Has been cancelled
Build, Push & Deploy to Phala Cloud / build-and-push (push) Has been cancelled
Test Packaging / Validate Packaging Configs (push) Has been cancelled
Test Packaging / Build & Test PyPI Package (push) Has been cancelled
Test Packaging / PyPI on Python ${{ matrix.python }} (push) Has been cancelled
Test Packaging / Pack & Test JS Tarballs (push) Has been cancelled
UI Fixture E2E / ui-fixture-e2e (push) Has been cancelled
UI Fixture E2E / fixture-e2e (push) Has been cancelled
UI Story Gate / story-gate (push) Has been cancelled
vault-ci / test (macos-latest) (push) Has been cancelled
vault-ci / test (ubuntu-latest) (push) Has been cancelled
vault-ci / test (windows-latest) (push) Has been cancelled
vault-ci / app-core wiring tests (push) Has been cancelled
verify-patches / verify patches/CHECKSUMS.sha256 (push) Has been cancelled
Voice Benchmark Smoke / voice-emotion fixture smoke (push) Has been cancelled
Voice Benchmark Smoke / voiceagentbench fixture smoke (push) Has been cancelled
Voice Benchmark Smoke / voicebench-quality unit smoke (push) Has been cancelled
Voice Benchmark Smoke / voicebench TypeScript unit (no audio) (push) Has been cancelled
Voice Benchmark Smoke / voice bench smoke summary (push) Has been cancelled
Windows CI / windows ([bun run --cwd packages/app-core test bun run --cwd packages/elizaos test bun run --cwd packages/cloud/shared test], app-and-cli) (push) Has been cancelled
Windows CI / windows ([bun run --cwd packages/scenario-runner test bun run --cwd packages/vault test bun run --cwd packages/security test bun run --cwd plugins/plugin-coding-tools test], framework-packages) (push) Has been cancelled
Windows CI / windows ([bun run --cwd plugins/plugin-elizacloud test bun run --cwd plugins/plugin-discord test bun run --cwd plugins/plugin-anthropic test bun run --cwd plugins/plugin-openai test bun run --cwd plugins/plugin-app-control test bun run --cwd plugins/pl… (push) Has been cancelled
Windows CI / windows ([node packages/scripts/run-turbo.mjs run build --filter=@elizaos/core --filter=@elizaos/shared --filter=@elizaos/agent --concurrency=4 node packages/scripts/run-bash-linux-only.mjs scripts/verify-riscv64-buildpaths.sh node packages/scripts/run… (push) Has been cancelled
Windows CI / windows ([node packages/scripts/run-turbo.mjs run typecheck --filter=@elizaos/core --filter=@elizaos/shared --filter=@elizaos/cloud-shared --concurrency=4 bun run --cwd packages/core test bun run --cwd packages/shared test], core-runtime, 75) (push) Has been cancelled
148 lines
7.0 KiB
Bash
Executable File
148 lines
7.0 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# test_dispatch_dryrun.sh -- exercises every dispatch-*.sh in --dry-run mode,
|
|
# asserting the printed plan contains plausible commands without provisioning
|
|
# anything or requiring an API key.
|
|
#
|
|
# Exits 0 on success. On any failed assertion, prints the failing case and the
|
|
# captured output, then exits 1.
|
|
set -uo pipefail
|
|
|
|
HERE="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
PASSED=0
|
|
FAILED=0
|
|
FAILURES=()
|
|
|
|
note() { echo "[test_dispatch_dryrun] $*"; }
|
|
|
|
# $1 = label, $2 = exit code expected, $3..N = command
|
|
run_case() {
|
|
local label="$1" expect="$2"; shift 2
|
|
local out rc
|
|
out="$("$@" 2>&1)"; rc=$?
|
|
if [[ "$rc" == "$expect" ]]; then
|
|
PASSED=$((PASSED+1))
|
|
note "PASS ($label) rc=$rc"
|
|
else
|
|
FAILED=$((FAILED+1))
|
|
FAILURES+=("$label (expected rc=$expect got rc=$rc)")
|
|
note "FAIL ($label) rc=$rc (expected $expect)"
|
|
echo "----- output -----"
|
|
echo "$out"
|
|
echo "------------------"
|
|
fi
|
|
printf '%s\n' "$out"
|
|
}
|
|
|
|
assert_contains() {
|
|
local label="$1" needle="$2" haystack="$3"
|
|
if printf '%s' "$haystack" | grep -qF -- "$needle"; then
|
|
PASSED=$((PASSED+1))
|
|
note "PASS ($label) found '$needle'"
|
|
else
|
|
FAILED=$((FAILED+1))
|
|
FAILURES+=("$label (missing '$needle')")
|
|
note "FAIL ($label) missing '$needle'"
|
|
fi
|
|
}
|
|
|
|
# --- dispatch-vast.sh, train task, multiple tiers ------------------------------
|
|
for TIER in 2b 4b 9b 27b 27b-256k; do
|
|
out="$(bash "$HERE/dispatch-vast.sh" --task train --tier "$TIER" --dry-run 2>&1 || true)"
|
|
assert_contains "vast/train/$TIER plan-banner" "[dispatch-vast] === PLAN ===" "$out"
|
|
assert_contains "vast/train/$TIER tier-line" "tier: $TIER" "$out"
|
|
assert_contains "vast/train/$TIER provider" "provider : vast.ai" "$out"
|
|
assert_contains "vast/train/$TIER dry-run-note" "DRY-RUN" "$out"
|
|
assert_contains "vast/train/$TIER train_vast" "train_vast.sh" "$out"
|
|
done
|
|
|
|
# --- dispatch-vast.sh, kernel-verify task --------------------------------------
|
|
out="$(bash "$HERE/dispatch-vast.sh" --task kernel-verify --gpu h100 --dry-run 2>&1 || true)"
|
|
assert_contains "vast/kernel-verify plan-banner" "[dispatch-vast] === PLAN ===" "$out"
|
|
assert_contains "vast/kernel-verify task-line" "task : kernel-verify" "$out"
|
|
assert_contains "vast/kernel-verify vastai-cmd" "vastai search offers" "$out"
|
|
assert_contains "vast/kernel-verify create-cmd" "vastai create instance" "$out"
|
|
assert_contains "vast/kernel-verify destroy-cmd" "vastai destroy instance" "$out"
|
|
|
|
# --- dispatch-vast.sh, bench task ----------------------------------------------
|
|
out="$(bash "$HERE/dispatch-vast.sh" --task bench --gpu rtx4090 --tier 2b --dry-run 2>&1 || true)"
|
|
assert_contains "vast/bench plan-banner" "[dispatch-vast] === PLAN ===" "$out"
|
|
assert_contains "vast/bench tier-line" "tier: 2b" "$out"
|
|
assert_contains "vast/bench gpu-line" "gpu : rtx4090" "$out"
|
|
|
|
# --- dispatch-vast.sh, min-VRAM gate -- 9b on rtx4090 24GB must FAIL -----------
|
|
out="$(bash "$HERE/dispatch-vast.sh" --task train --tier 9b --gpu rtx4090 --dry-run 2>&1)"; rc=$?
|
|
if [[ "$rc" != "0" ]]; then
|
|
PASSED=$((PASSED+1)); note "PASS (vast/9b on rtx4090 vram-gate) refused as expected"
|
|
else
|
|
FAILED=$((FAILED+1)); FAILURES+=("vast/9b on rtx4090 should have refused")
|
|
note "FAIL (vast/9b on rtx4090) accepted -- output:"; echo "$out"
|
|
fi
|
|
|
|
# --- dispatch-vast.sh, missing --yes-i-will-pay (without --dry-run) must FAIL --
|
|
out="$(bash "$HERE/dispatch-vast.sh" --task train --tier 9b 2>&1)"; rc=$?
|
|
if [[ "$rc" != "0" ]]; then
|
|
PASSED=$((PASSED+1)); note "PASS (vast/9b without --yes-i-will-pay) refused as expected"
|
|
assert_contains "vast/no-pay refusal-message" "yes-i-will-pay" "$out"
|
|
else
|
|
FAILED=$((FAILED+1)); FAILURES+=("vast/9b without --yes-i-will-pay should have refused")
|
|
note "FAIL (vast/9b no-pay) accepted -- output:"; echo "$out"
|
|
fi
|
|
|
|
# --- dispatch-nebius.sh, train task, multiple tiers ----------------------------
|
|
for TIER in 2b 4b 9b 27b 27b-256k; do
|
|
out="$(bash "$HERE/dispatch-nebius.sh" --task train --tier "$TIER" --dry-run 2>&1 || true)"
|
|
assert_contains "nebius/train/$TIER plan-banner" "[dispatch-nebius] === PLAN ===" "$out"
|
|
assert_contains "nebius/train/$TIER tier-line" "tier: $TIER" "$out"
|
|
assert_contains "nebius/train/$TIER provider" "provider : nebius" "$out"
|
|
assert_contains "nebius/train/$TIER preset-line" "preset : gpu-h200x" "$out"
|
|
assert_contains "nebius/train/$TIER train_nebius" "train_nebius.sh" "$out"
|
|
assert_contains "nebius/train/$TIER dry-run-note" "DRY-RUN" "$out"
|
|
done
|
|
|
|
# --- dispatch-nebius.sh, kernel-verify task ------------------------------------
|
|
out="$(bash "$HERE/dispatch-nebius.sh" --task kernel-verify --gpu h200 --dry-run 2>&1 || true)"
|
|
assert_contains "nebius/kernel-verify plan-banner" "[dispatch-nebius] === PLAN ===" "$out"
|
|
assert_contains "nebius/kernel-verify provision" "train_nebius.sh provision" "$out"
|
|
assert_contains "nebius/kernel-verify teardown" "train_nebius.sh teardown" "$out"
|
|
|
|
# --- dispatch-nebius.sh, missing --yes-i-will-pay (without --dry-run) -- FAIL --
|
|
out="$(NEBIUS_PROJECT_ID="" bash "$HERE/dispatch-nebius.sh" --task train --tier 9b 2>&1)"; rc=$?
|
|
if [[ "$rc" != "0" ]]; then
|
|
PASSED=$((PASSED+1)); note "PASS (nebius/9b without --yes-i-will-pay) refused as expected"
|
|
assert_contains "nebius/no-pay refusal-message" "yes-i-will-pay" "$out"
|
|
else
|
|
FAILED=$((FAILED+1)); FAILURES+=("nebius/9b without --yes-i-will-pay should have refused")
|
|
note "FAIL (nebius/9b no-pay) accepted -- output:"; echo "$out"
|
|
fi
|
|
|
|
# --- run-on-cloud.sh routing -- tier 27b without --provider should pick nebius -
|
|
out="$(bash "$HERE/run-on-cloud.sh" --task train --tier 27b --dry-run 2>&1 || true)"
|
|
assert_contains "selector/27b auto-route-to-nebius" "[dispatch-nebius] === PLAN ===" "$out"
|
|
|
|
# --- run-on-cloud.sh routing -- tier 27b-256k should pick nebius --------------
|
|
out="$(bash "$HERE/run-on-cloud.sh" --task train --tier 27b-256k --dry-run 2>&1 || true)"
|
|
assert_contains "selector/27b-256k auto-route-to-nebius" "[dispatch-nebius] === PLAN ===" "$out"
|
|
|
|
# --- run-on-cloud.sh routing -- tier 9b without --provider -> recommended=vast -
|
|
out="$(bash "$HERE/run-on-cloud.sh" --task train --tier 9b --dry-run 2>&1 || true)"
|
|
assert_contains "selector/9b auto-route-to-vast" "[dispatch-vast] === PLAN ===" "$out"
|
|
|
|
# --- run-on-cloud.sh --help works without args ---------------------------------
|
|
out="$(bash "$HERE/run-on-cloud.sh" --help 2>&1)"; rc=$?
|
|
if [[ "$rc" == "0" ]]; then
|
|
PASSED=$((PASSED+1)); note "PASS (selector --help) rc=$rc"
|
|
assert_contains "selector --help mentions usage" "Usage:" "$out"
|
|
else
|
|
FAILED=$((FAILED+1)); FAILURES+=("selector --help non-zero")
|
|
note "FAIL (selector --help) rc=$rc"
|
|
fi
|
|
|
|
# --- summary -------------------------------------------------------------------
|
|
note "------------------------------------------"
|
|
note "summary: $PASSED passed, $FAILED failed"
|
|
if [[ "$FAILED" -gt 0 ]]; then
|
|
for f in "${FAILURES[@]}"; do note " - $f"; done
|
|
exit 1
|
|
fi
|
|
exit 0
|