mirror of
https://github.com/EstrellaXD/Auto_Bangumi.git
synced 2026-10-29 03:36:15 +08:00
- 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 请求头
15 lines
538 B
Bash
Executable File
15 lines
538 B
Bash
Executable File
#!/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
|