run-tests

GitHub

指导如何执行测试套件,包括选择本地或Daytona环境、构建依赖、匹配生产运行时(如Bun与Electron Node),并规范测试结果记录与验证流程。

.opencode/skills/run-tests/SKILL.md different-ai/openwork

Trigger Scenarios

执行单元测试或E2E测试 排查测试失败原因 验证代码在生产运行时的行为

Install

npx skills add different-ai/openwork --skill run-tests -g -y
More Options

Non-standard path

npx skills add https://github.com/different-ai/openwork/tree/dev/.opencode/skills/run-tests -g -y

Use without installing

npx skills use different-ai/openwork@run-tests

指定 Agent (Claude Code)

npx skills add different-ai/openwork --skill run-tests -a claude-code -g -y

安装 repo 全部 skill

npx skills add different-ai/openwork --all -g -y

预览 repo 内 skill

npx skills add different-ai/openwork --list

SKILL.md

Frontmatter
{
    "name": "run-tests",
    "description": "Run the tests, run one spec, run e2e locally or on Daytona, investigate a skipped spec. Use for executing @openwork\/testkit agent-first verification."
}

Skill: Run Tests

Run the landable tree

  • Check out the exact PR head that will land. After any rebase or cherry-pick, discard the old verdict and run again.
  • Run one test at a time so each failure and ambient test evidence has one owner.

Choose the execution environment

pnpm evals:e2e <slug>
pnpm evals:pr specs/<name>.test.ts

The CLI prints the placement and reason; copy that line into the report. Use --local only when the user asks for local. --daytona requires Daytona. Never switch lanes to turn a red Daytona run green.

Prepare local fallback

pnpm --filter @openwork/types build
pnpm --filter @openwork-ee/den-db build
pnpm --filter @openwork/email build
pnpm dev:den:mysql
  • Local server() requires MySQL at 127.0.0.1:3306.
  • Build those workspace dependencies before local Den; otherwise den-api imports can fail.
  • If the checkout path contains spaces, set OPENWORK_EVAL_SURFACES_DIR to a space-free path before E2E tests. node-gyp and electron-rebuild require it.

Choose one lane

  • Run one app-less PR-lane test:
pnpm evals:pr specs/<name>.test.ts
  • Run one app/Den-driving E2E test:
pnpm evals:e2e <name>
  • The CLI owns placement and prints placement: <daytona|local> (<reason>).

Match the runtime

Check what runtime the changed code ships on before trusting a green run. apps/server tests run on Bun; Desktop runs that same code on Electron's Node (undici). If the change touches fetch, streams, signals, GC, or timers, run it on the shipping runtime too:

ELECTRON_RUN_AS_NODE=1 apps/desktop/node_modules/electron/dist/Electron.app/Contents/MacOS/Electron --expose-gc <script>

A green run on the wrong runtime is not evidence.

Read the verdict

  • Record the exact command, exit code, and passed/failed/skipped counts.
  • Report each skip as skipped — needs: X; never call it passed. A green command containing skips makes the overall verdict Incomplete.
  • Use Passed, Incomplete, or Failed for the overall result.

Iterate, then cold-boot

  • While iterating, reuse a warm Den with OPENWORK_EVAL_DEN_API_URL.
  • Before declaring Passed, remove the reuse override and cold-boot through server() on the same commit.
  • Inject secrets with infisical run --silent --; never print or echo values.

Version History

  • c26be48 Current 2026-09-23 01:45

    新增“匹配运行时”步骤,强调在Bun和Electron Node环境下分别验证,防止因运行时差异导致的误判。

  • ff5d298 2026-08-20 11:36

Same Skill Collection

.opencode/skills/agent-first-screenshots/SKILL.md
.opencode/skills/browser-automation/SKILL.md
.opencode/skills/build-a-witness/SKILL.md
.opencode/skills/cloud-dashboard-walkthrough/SKILL.md
.opencode/skills/create-plugin/SKILL.md
.opencode/skills/daytona-chrome-cdp/SKILL.md
.opencode/skills/daytona-cloud-instance/SKILL.md
.opencode/skills/daytona-cloud-server/SKILL.md
.opencode/skills/daytona-dev/SKILL.md
.opencode/skills/daytona-electron-den/SKILL.md
.opencode/skills/daytona-electron-test/SKILL.md
.opencode/skills/daytona-flow-validator/SKILL.md
.opencode/skills/daytona-recording-artifacts/SKILL.md
.opencode/skills/daytona-secrets-volume/SKILL.md
.opencode/skills/daytona-seeded-cloud-demo/SKILL.md
.opencode/skills/daytona-windows-cert/SKILL.md
.opencode/skills/daytona/SKILL.md
.opencode/skills/diagnose-a-red-run/SKILL.md
.opencode/skills/fraimz/SKILL.md
.opencode/skills/get-env-var/SKILL.md
.opencode/skills/hunt-a-prod-error/SKILL.md
.opencode/skills/open-a-pr/SKILL.md
.opencode/skills/openwork-models/SKILL.md
.opencode/skills/preview-my-work/SKILL.md
.opencode/skills/product-tutorial-pipeline/SKILL.md
.opencode/skills/prove-a-pr/SKILL.md
.opencode/skills/publish-evidence/SKILL.md
.opencode/skills/record-a-demo/SKILL.md
.opencode/skills/release/SKILL.md
.opencode/skills/review-a-contributor-pr/SKILL.md
.opencode/skills/run-evals/SKILL.md
.opencode/skills/shadcn/SKILL.md
.opencode/skills/upload-photo/SKILL.md
.opencode/skills/validate-a-release/SKILL.md
.opencode/skills/write-a-spec/SKILL.md
.warden/skills/confidentiality-review/SKILL.md
.warden/skills/design-spec-review/SKILL.md
.warden/skills/desktop-den-sync-review/SKILL.md
.warden/skills/diff-security-review/SKILL.md
.warden/skills/spec-provenance-review/SKILL.md
integrations/agent-plugins/openwork-connect/skills/openwork-connect/SKILL.md

Metadata

Files
0
Version
c26be48
Hash
053862e2
Indexed
2026-08-20 11:36

Главная - Вики-сайт
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-09-23 06:45
浙ICP备14020137号-1