agentleFS
ayutazayutaz/piper-plus/.claude/skills/run-tests/SKILL.md

run-tests

Skill240 starsChanged 20 days agoMITView on GitHub

piper-plus の各言語ランタイムのテストを実行します。引数 python/rust/cs/go/js/cpp/all で対象を選択。未指定なら git diff から自動判定。

48 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use release and code-review.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • MicrosoftSkill

    release

    Use ONLY when the user explicitly asks to cut/publish a Huabu desktop release or tag a version. Performs an outward action — bumps the version in apps/desktop/package.json, commits + annotated-tags vX.Y.Z, and pushes the branch + tag. That tag push auto-builds the macOS/Windows installers and publishes a GitHub Release. Provides `status`, `bump`, `tag-push`, and a one-command `run` (bump → tag-push).

    Also in 5 projects that use this

  • GoogleSkill

    code-review

    Adversarial systems, concurrency, memory-model, and architecture code review protocol. Use this skill whenever asked to review code, PRs, diffs, or branches in Filament.

    Also in 5 projects that use this

The file

Files
SKILL.md

piper-plus テスト実行

各言語ランタイムのテストを CI と同じ条件でローカル実行します。

変更ファイル

!git diff --name-only HEAD 2>/dev/null | head -20

ターゲット選択

$ARGUMENTS:

  • python → Python 全体
  • rust → Rust workspace
  • cs → .NET solution
  • go → Go module
  • js → JS/WASM (npm-package)
  • cpp → C++ (cmake build + ctest)
  • all → 上記すべて (順次、失敗しても次に進む)
  • (空) → git diff HEAD の結果から判定 (複数該当ならそれら全部)

各ターゲットの実行コマンド

Python

cd src/python_run
uv run pytest tests/ -o addopts="" -v --tb=short
cd ../..

# G2P 単体テスト (もし対象なら)
cd src/python/g2p
uv run pytest -o addopts="" -v --tb=short
cd ../../..

注意:

  • pytest.ini の --cov を -o addopts="" で上書き (pytest-cov が無い環境向け)
  • 学習・ベンチマーク系テストは除外 (-m "unit and not training and not benchmark" も可)

Rust

cd src/rust
cargo test -p piper-plus --no-fail-fast
cargo test -p piper-plus --features naist-jdic --no-fail-fast
cd ../..

C# (.NET)

dotnet test src/csharp/PiperPlus.sln -c Release --nologo --verbosity minimal

Go

cd src/go
go vet ./... ./phonemize/...
go test -race -count=1 ./... ./phonemize/...
cd ../..

JavaScript / WASM

cd src/wasm/openjtalk-web
npm run test:npm-package:all
cd ../../..

C++

# Build がまだなら先にビルド
if [ ! -f build/CMakeCache.txt ]; then
  cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=ON
fi
cmake --build build --config Release
ctest --test-dir build -C Release --output-on-failure

結果報告

各ターゲット完了後、以下の形式で報告:

## テスト実行結果

| ランタイム | Pass | Fail | Skip | 時間 |
|----------|------|------|------|------|
| Python (pytest) | 212 | 0 | 20 | 22s |
| Rust (cargo test) | 145 | 0 | 0 | 1m |
| ... | ... | ... | ... | ... |

### 失敗詳細
(失敗があった場合のみ、最初の 3 件まで)

- `test_xxx` (ファイル:行): エラー要約

失敗時のヒント

  • Python ImportError → uv sync で依存をインストール
  • Rust feature not found → cargo build で先にビルドを通す
  • C# build failed → dotnet restore src/csharp/PiperPlus.sln を実行
  • WASM ImportError → cd src/wasm/openjtalk-web && npm install
  • C++ ctest failed → cmake --build build --verbose でビルドエラーを再確認

注意

  • 失敗しても他のターゲットを続行する (all 時)
  • 単一ターゲット時は失敗即停止
  • 環境依存テスト (espeak-ng 等) はスキップされる場合あり

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.