turbo-test

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Turbo-Themes Test Pipeline

Turbo-Themes 测试流水线

Run the full build and test pipeline for turbo-themes. This project has a multi-stage pipeline where later stages depend on earlier outputs.
Do NOT use
uv run lintro tst
for this project — it does not cover the full turbo-themes pipeline (examples, E2E, site build).
运行turbo-themes的完整构建和测试流水线。该项目拥有一个多阶段流水线,后续阶段依赖于前期阶段的输出。
请勿为该项目使用
uv run lintro tst
——它无法覆盖完整的turbo-themes流水线(示例、端到端测试、站点构建)。

Full Pipeline (default)

完整流水线(默认)

When
/turbo-test
is invoked with no arguments, run all stages in order:
bash
undefined
当不带任何参数调用
/turbo-test
时,按顺序运行所有阶段:
bash
undefined

1. Lint (fast fail — catches formatting/type issues early)

1. 代码检查(快速失败——尽早捕获格式/类型问题)

uv run lintro chk
uv run lintro chk

2. Build core + packages

2. 构建核心代码及包

bun run build
bun run build

3. Build example projects (depends on core build output)

3. 构建示例项目(依赖于核心构建输出)

bun run examples:build
bun run examples:build

4. Unit tests (~2000 tests across ~74 files, with coverage)

4. 单元测试(约74个文件共2000个测试,包含覆盖率统计)

bun run test
bun run test

5. Example E2E tests (~139 tests across example projects)

5. 示例端到端测试(示例项目共约139个测试)

bun run examples:test

If any stage fails, stop and fix before continuing to the next stage.
bun run examples:test

如果任何阶段失败,请停止并修复后再继续下一阶段。

Subcommands

子命令

ArgumentStagesUse when...
(none)All 5 stagesFull validation (default)
lint
Lint onlyQuick formatting/style check
build
Build + examples:buildVerifying build works
unit
Unit tests onlyRunning tests after a build
examples
examples:build + examples:testValidating example projects
quick
Lint + build + unit testsFast check, skip examples
参数阶段使用场景
无参数全部5个阶段完整验证(默认)
lint
仅代码检查快速格式/风格检查
build
构建 + examples:build验证构建是否正常工作
unit
仅单元测试构建完成后运行测试
examples
examples:build + examples:test验证示例项目
quick
代码检查 + 构建 + 单元测试快速检查,跳过示例项目

Optional E2E Stages

可选端到端测试阶段

These are NOT part of the default pipeline. Run when explicitly needed:
bash
undefined
这些不属于默认流水线。仅在明确需要时运行:
bash
undefined

Smoke tests

冒烟测试

bun run e2e:smoke
bun run e2e:smoke

Visual regression tests (snapshots generated on Linux CI only)

视觉回归测试(仅Linux CI环境生成快照)

bun run e2e:visual
bun run e2e:visual

Accessibility audits

可访问性审计

bun run e2e:a11y

**Note on visual regression:** Snapshots are generated on Linux CI. Local
failures on macOS are expected. Use the `maintenance-generate-snapshots.yml`
workflow to regenerate snapshots after visual changes.
bun run e2e:a11y

**视觉回归测试注意事项:** 快照仅在Linux CI环境生成。在macOS本地运行时出现失败是预期情况。在进行视觉变更后,使用`maintenance-generate-snapshots.yml`工作流重新生成快照。

Rules

规则

  • Lint before build — catches issues early without waiting for compilation.
  • Build before examples:build — examples depend on core package output.
  • Build before test — some tests depend on build artifacts (tokens.json, CSS).
  • Always include examples — example builds and tests are part of the standard pipeline, not optional extras. Do not skip them unless explicitly told to.
  • 先检查再构建——无需等待编译即可尽早发现问题。
  • 先构建再构建示例——示例项目依赖于核心包的输出。
  • 先构建再测试——部分测试依赖于构建产物(tokens.json、CSS)。
  • 始终包含示例项目——示例项目的构建和测试是标准流水线的一部分,而非可选附加项。除非明确要求,否则请勿跳过。