Files
Auto_Bangumi/scripts/test_example_plugins.sh
Estrella Pan a1adf237b8 feat(4.0-P7): 新增 5 个示例插件,逐个运行契约与行为测试
- webhook-on-event、custom-rss-site、template-rename、nfo-writer、ntfy-notifier
- scripts/test_example_plugins.sh 对每个示例运行 ab-plugin validate 与自带测试
- 宿主侧测试把全部示例载入 PluginManager,断言 Provider 与钩子已登记
- NotifierContract 发现 ntfy 示例的中文标题请求头缺陷,已改用 bytes 请求头
2026-10-08 14:50:59 +02:00

15 lines
538 B
Bash
Executable File
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/usr/bin/env bash
# 逐个示例插件:校验清单,再跑它自己的测试(与插件作者在示例目录里 `uv run pytest` 一致)。
# 在仓库根目录运行;CI 与本地共用。
set -euo pipefail
root="$(cd "$(dirname "$0")/.." && pwd)"
cd "$root/backend"
for dir in "$root"/examples/plugins/*/; do
name="$(basename "$dir")"
echo "== $name"
uv run ab-plugin validate "$dir"
if [ -d "$dir/tests" ]; then
uv run pytest -q -c "$dir/pyproject.toml" --rootdir "$dir" -p no:cacheprovider "$dir/tests"
fi
done