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
178 lines
6.0 KiB
TypeScript
178 lines
6.0 KiB
TypeScript
/**
|
|
* Vitest configuration for app-control unit, jsdom, and source-alias test lanes.
|
|
*/
|
|
|
|
import { createRequire } from "node:module";
|
|
import path from "node:path";
|
|
import { defineConfig } from "vitest/config";
|
|
|
|
const sharedSrc = path.resolve(__dirname, "../../packages/shared/src");
|
|
const coreSrc = path.resolve(__dirname, "../../packages/core/src");
|
|
const cloudRoutingSrc = path.resolve(
|
|
__dirname,
|
|
"../../packages/cloud/routing/src",
|
|
);
|
|
const loggerSrc = path.resolve(__dirname, "../../packages/logger/src");
|
|
const uiSrc = path.resolve(__dirname, "../../packages/ui/src");
|
|
const require = createRequire(import.meta.url);
|
|
// react-dom is not a direct dependency of this plugin; resolve it through the
|
|
// @testing-library/react install (which pins react-dom@19.2.5, matching react).
|
|
const tlRequire = createRequire(
|
|
require.resolve("@testing-library/react/package.json"),
|
|
);
|
|
|
|
export default defineConfig({
|
|
// Use the automatic JSX runtime so .tsx render tests need no `import React`.
|
|
esbuild: {
|
|
jsx: "automatic",
|
|
jsxImportSource: "react",
|
|
},
|
|
resolve: {
|
|
// Force a single React instance so the view components and the
|
|
// @elizaos/ui agent-surface hook share one renderer under jsdom.
|
|
dedupe: ["react", "react-dom"],
|
|
alias: [
|
|
{
|
|
// @elizaos/ui DynamicViewLoader statically imports this plugin-health
|
|
// subpath; anchor it to source (no built plugin-health dist in the
|
|
// keyless lane). Self-contained so it needs no config-local path vars.
|
|
find: /^@elizaos\/plugin-health\/screen-time\/mobile-signal-setup$/,
|
|
replacement: new URL(
|
|
"../plugin-health/src/screen-time/mobile-signal-setup.ts",
|
|
import.meta.url,
|
|
).pathname,
|
|
},
|
|
{
|
|
find: /^react$/,
|
|
replacement: path.dirname(require.resolve("react/package.json")),
|
|
},
|
|
{
|
|
find: /^react\/jsx-runtime$/,
|
|
replacement: require.resolve("react/jsx-runtime"),
|
|
},
|
|
{
|
|
find: /^react\/jsx-dev-runtime$/,
|
|
replacement: require.resolve("react/jsx-dev-runtime"),
|
|
},
|
|
{
|
|
find: /^react-dom$/,
|
|
replacement: path.dirname(tlRequire.resolve("react-dom/package.json")),
|
|
},
|
|
{
|
|
find: /^react-dom\/client$/,
|
|
replacement: tlRequire.resolve("react-dom/client"),
|
|
},
|
|
{
|
|
find: /^react-dom\/server$/,
|
|
replacement: tlRequire.resolve("react-dom/server"),
|
|
},
|
|
// The view component imports only `useAgentElement` from the
|
|
// agent-surface subpath. Resolve it to source so the hook shares the
|
|
// same React singleton instead of the prebuilt dist bundle.
|
|
{
|
|
find: "@elizaos/ui/agent-surface",
|
|
replacement: path.join(uiSrc, "agent-surface/useAgentElement.ts"),
|
|
},
|
|
{
|
|
find: "@elizaos/ui/events",
|
|
replacement: path.join(uiSrc, "events/index.ts"),
|
|
},
|
|
// The spatial view imports the shared spatial primitives. Resolve it to
|
|
// source so its internal React hooks share the same singleton as the test
|
|
// renderer instead of pulling in a second React copy from dist.
|
|
{
|
|
find: "@elizaos/ui/spatial",
|
|
replacement: path.join(uiSrc, "spatial/index.ts"),
|
|
},
|
|
// React-free settings-section metadata consumed by the VIEWS action's
|
|
// subview deep-linking (token resolution + planner subview list).
|
|
// Resolve to source so tests need no built @elizaos/ui dist.
|
|
// ViewManagerView.tsx renders the kit Button. Resolve it to source so the
|
|
// render test needs no built @elizaos/ui dist — the Windows CI prep builds
|
|
// only core/shared, so a `dist/components/ui/button.js` export target is
|
|
// absent there and vite fails import-analysis. (Its transitive deps —
|
|
// cva, @radix-ui/react-slot, clsx, tailwind-merge — resolve from the
|
|
// workspace.)
|
|
{
|
|
find: "@elizaos/ui/components/ui/button",
|
|
replacement: path.join(uiSrc, "components/ui/button.tsx"),
|
|
},
|
|
{
|
|
find: "@elizaos/ui/components/settings/settings-section-tokens",
|
|
replacement: path.join(
|
|
uiSrc,
|
|
"components/settings/settings-section-tokens.ts",
|
|
),
|
|
},
|
|
{
|
|
find: "@elizaos/ui/components/settings/settings-section-meta",
|
|
replacement: path.join(
|
|
uiSrc,
|
|
"components/settings/settings-section-meta.ts",
|
|
),
|
|
},
|
|
// Canonical VAD capture defaults, resolved to source so the settings
|
|
// drift-guard test can assert the SETTINGS voice defaults never diverge
|
|
// from what the running capture path uses. Load-safe: the module only
|
|
// imports a pure helper and touches browser globals inside functions.
|
|
{
|
|
find: "@elizaos/ui/voice/local-asr-capture",
|
|
replacement: path.join(uiSrc, "voice/local-asr-capture.ts"),
|
|
},
|
|
// Use workspace source for @elizaos/shared and @elizaos/core so
|
|
// recently-added exports resolve at test time without requiring
|
|
// a fresh dist build of either package.
|
|
{
|
|
find: /^@elizaos\/shared\/(.*)\.js$/,
|
|
replacement: path.join(sharedSrc, "$1.ts"),
|
|
},
|
|
{
|
|
find: /^@elizaos\/shared\/(.*)$/,
|
|
replacement: path.join(sharedSrc, "$1.ts"),
|
|
},
|
|
{
|
|
find: "@elizaos/shared",
|
|
replacement: path.join(sharedSrc, "index.ts"),
|
|
},
|
|
{
|
|
find: /^@elizaos\/core\/(.*)\.js$/,
|
|
replacement: path.join(coreSrc, "$1.ts"),
|
|
},
|
|
{
|
|
find: "@elizaos/core",
|
|
replacement: path.join(coreSrc, "index.node.ts"),
|
|
},
|
|
// Core's src re-exports the cloud routing surface from
|
|
// `@elizaos/cloud-routing`, which ships no dist. With @elizaos/core
|
|
// pinned to source above, that re-export only resolves when
|
|
// cloud-routing is source-aliased too — otherwise vite falls through
|
|
// to its missing `dist/index.js` and fails to resolve the entry.
|
|
{
|
|
find: "@elizaos/cloud-routing",
|
|
replacement: path.join(cloudRoutingSrc, "index.ts"),
|
|
},
|
|
{
|
|
find: "@elizaos/logger",
|
|
replacement: path.join(loggerSrc, "index.ts"),
|
|
},
|
|
],
|
|
},
|
|
test: {
|
|
globals: false,
|
|
environment: "node",
|
|
include: ["src/**/*.test.{ts,tsx}"],
|
|
exclude: ["node_modules", "dist"],
|
|
root: path.resolve(__dirname),
|
|
coverage: {
|
|
reporter: ["text", "json", "html"],
|
|
exclude: ["node_modules", "dist", "**/*.test.{ts,tsx}"],
|
|
},
|
|
deps: {
|
|
optimizer: {
|
|
web: { enabled: false },
|
|
ssr: { enabled: false },
|
|
},
|
|
},
|
|
},
|
|
});
|