Agent Skills › vllm-project/vime › add-tests-and-ci

add-tests-and-ci

GitHub

指导添加或更新测试用例及配置 CI 流程,包括遵循命名规范、适配 Buildkite CI 注册、本地验证及提供 PR 说明,确保测试与持续集成系统同步。

.claude/skills/add-tests-and-ci/SKILL.md vllm-project/vime

Trigger Scenarios

用户要求为新增功能编写测试 用户要求修复或更新现有测试文件 用户要求修改或更新 CI 工作流配置 用户询问在 PR 前如何运行针对性检查

Install

npx skills add vllm-project/vime --skill add-tests-and-ci -g -y
More Options

Non-standard path

npx skills add https://github.com/vllm-project/vime/tree/main/.claude/skills/add-tests-and-ci -g -y

Use without installing

npx skills use vllm-project/vime@add-tests-and-ci

指定 Agent (Claude Code)

npx skills add vllm-project/vime --skill add-tests-and-ci -a claude-code -g -y

安装 repo 全部 skill

npx skills add vllm-project/vime --all -g -y

预览 repo 内 skill

npx skills add vllm-project/vime --list

SKILL.md

Frontmatter
{
    "name": "add-tests-and-ci",
    "description": "Guide for adding or updating vime tests and CI wiring. Use when tasks require new test cases, CI registration, test matrix updates, or workflow template changes."
}

Add Tests and CI

Add reliable tests and integrate them with vime CI flow.

When to Use

Use this skill when:

  • User asks to add tests for new behavior
  • User asks to fix or update existing tests in tests/
  • User asks to update CI workflow behavior
  • User asks how to run targeted checks before PR

Step-by-Step Guide

Step 1: Pick the Right Test Pattern

  • Follow existing naming: tests/test_<feature>.py
  • Start from nearest existing test file for your model/path
  • Keep test scope small and behavior-focused

Step 2: Keep CI Compatibility

  • CI executes registered test files with python tests/<file>.py, not only pytest discovery. New CPU pytest files should include:
import pytest

NUM_GPUS = 0

if __name__ == "__main__":
    raise SystemExit(pytest.main([__file__]))
  • Set NUM_GPUS = 0 for CPU-only tests, following the existing test metadata convention.
  • For GPU/e2e tests, follow the nearby file pattern (prepare(), execute(), NUM_GPUS, and any model/dataset constants).

Step 3: Register Tests in Buildkite CI

Whenever adding, moving, or renaming a test file, update its Buildkite registration before finishing:

  1. Register CPU test files in the appropriate command list in .buildkite/pipeline.yml, beside similar tests. Agent CPU tests belong in agent-adapter.
  2. Register GPU/e2e tests in .buildkite/gpu_suites.py, with the matching GPU count and environment settings. Update .buildkite/pipeline.yml when changing suite selection or wiring.
  3. Include the registration changes with the tests. These files are the source of truth; there is no GitHub workflow regeneration step.

Only skip fixed matrix registration when the test is intentionally helper-only or manually invoked; state that reason in the final response.

Step 4: Run Local Validation

  • Run the exact existing test files you changed, if any.
  • For new registered tests, run the same shape CI will use, for example python tests/test_new_file.py.
  • Run repository-wide checks only when they are already part of the task or workflow.
  • Avoid documenting placeholder test commands that may not exist in the current tree.

Step 5: Keep Buildkite Sources in Sync

For CI workflow changes unrelated to a new, moved, or renamed test:

  1. Edit .buildkite/pipeline.yml for always-on CPU commands and pipeline wiring.
  2. Edit .buildkite/gpu_suites.py for generated GPU jobs rather than editing its generated output.
  3. Keep suite definitions, selection, and .buildkite/README.md consistent when changing suites.

Step 6: Provide Verifiable PR Notes

Include:

  • Which tests were added/changed
  • Where each new/renamed test was registered in .buildkite/pipeline.yml or .buildkite/gpu_suites.py
  • Exact commands executed
  • GPU assumptions for each test path
  • Why this coverage protects against regression

Common Mistakes

  • Editing generated GPU jobs instead of their source
  • Relying on pytest discovery for a new test in a suite with an explicit file list
  • Treating a green CPU build as GPU validation; GPU suites require the manual Buildkite gate
  • Adding a CPU pytest file that passes under pytest tests/foo.py but fails under CI's python tests/foo.py
  • Adding tests without following existing constants/conventions
  • Making tests too large or non-deterministic
  • Skipping local validation and relying only on remote CI

Reference Locations

  • Pytest config: pyproject.toml
  • Tests: tests/
  • CI sources: .buildkite/pipeline.yml, .buildkite/gpu_suites.py
  • Buildkite guide: .buildkite/README.md
  • CI guide: docs/en/developer_guide/ci.md

Version History

  • 791f101 Current 2026-09-22 04:52

    将 CI 平台从 GitHub 切换至 Buildkite;移除对 run-ci-changed 自动提取 GPU 数的依赖,改为显式设置 NUM_GPUS;细化 CPU/GPU 测试注册规范。

  • 8d1f4cc 2026-07-05 14:58

Same Skill Collection

.claude/skills/add-dynamic-filter/SKILL.md
.claude/skills/add-eval-dataset-config/SKILL.md
.claude/skills/add-reward-function/SKILL.md
.claude/skills/add-rollout-function/SKILL.md
.claude/skills/release/SKILL.md
.claude/skills/vime-code-review-preferences/SKILL.md

Metadata

Files
0
Version
791f101
Hash
c7830fa7
Indexed
2026-07-05 14:58

ホーム - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-09-30 15:33
浙ICP备14020137号-1