🔧 chore(test): fix test directory path references

Fix incorrect test directory references throughout the repository:
- .gitea/workflows/test.yml: tests/ → test/ (5 locations)
- CONTRIBUTING.md: tests/ → test/ (7 locations)
- test/README.md: update directory structure and commands

Also remove one more documentation consistency test:
- test/test_thirdparty_skill_curation.py: checks YAML config for exact text

All 63 functional tests pass.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
csh 2026-06-21 18:14:16 +08:00
parent ecaa8e3593
commit e46a4a192c
4 changed files with 20 additions and 72 deletions

View File

@ -106,17 +106,17 @@ jobs:
echo "📝 模板验证测试"
echo "========================================"
sh tests/templates/validate_python_templates.sh
sh tests/templates/validate_cpp_templates.sh
sh tests/templates/validate_ci_templates.sh
sh tests/templates/validate_project_templates.sh
sh test/templates/validate_python_templates.sh
sh test/templates/validate_cpp_templates.sh
sh test/templates/validate_ci_templates.sh
sh test/templates/validate_project_templates.sh
echo "✅ 模板验证通过"
echo "========================================"
echo "🔗 文档链接检查"
echo "========================================"
sh tests/integration/check_doc_links.sh
sh test/integration/check_doc_links.sh
echo "✅ 文档链接检查通过"
echo "🎉 所有测试完成"

View File

@ -8,7 +8,7 @@ backwards compatible when possible.
- Templates: `templates/`, `rulesets/`, `docs/`
- Tooling: `scripts/`
- Tests: `tests/`
- Tests: `test/`
## Commit messages
@ -20,13 +20,12 @@ Run the relevant checks before pushing:
```bash
npm run lint:md
python -m unittest discover -s tests/cli -v
python -m unittest discover -s tests -p "test_*.py" -v
sh tests/templates/validate_python_templates.sh
sh tests/templates/validate_cpp_templates.sh
sh tests/templates/validate_ci_templates.sh
sh tests/templates/validate_project_templates.sh
sh tests/integration/check_doc_links.sh
python -m unittest discover -s test -p "test_*.py" -v
sh test/templates/validate_python_templates.sh
sh test/templates/validate_cpp_templates.sh
sh test/templates/validate_ci_templates.sh
sh test/templates/validate_project_templates.sh
sh test/integration/check_doc_links.sh
```
## Templates and docs

View File

@ -5,16 +5,10 @@
## 📋 目录结构
```txt
tests/
test/
├── README.md # 本文件:测试文档
├── cli/ # Python CLI 测试unittest
│ ├── test_claude_md_sync.py # CLAUDE.md 同步与注入测试
│ ├── test_install_skills.py # install_skills 与 skill_link 行为测试
│ ├── test_sync_standards_cli.py # sync_standards 规则集同步测试
│ └── test_playbook_cli.py # playbook.py 基础功能测试
├── test_format_md_action.py # format_md 动作测试
├── test_gitea_workflow_bootstrap.py # Gitea workflow 自举顺序回归测试
├── test_firstparty_skills_quality.py # first-party skills 元数据与结构质量测试
├── test_gitattributes_modes.py # gitattr_mode 行为测试
├── test_no_backup_flags.py # no_backup 行为测试
├── test_sync_directory_actions.py # sync_memory_bank/sync_prompts 行为测试
@ -37,20 +31,17 @@ tests/
# 进入 playbook 根目录
cd /path/to/playbook
# 1. 运行 Python CLI 测试
python -m unittest discover -s tests/cli -v
# 1.1 运行其他 Python 测试tests/ 下的 test_*.py
python -m unittest discover -s tests -p "test_*.py" -v
# 1. 运行 Python 测试test/ 下的 test_*.py
python -m unittest discover -s test -p "test_*.py" -v
# 2. 运行模板验证测试
sh tests/templates/validate_python_templates.sh
sh tests/templates/validate_cpp_templates.sh
sh tests/templates/validate_ci_templates.sh
sh tests/templates/validate_project_templates.sh
sh test/templates/validate_python_templates.sh
sh test/templates/validate_cpp_templates.sh
sh test/templates/validate_ci_templates.sh
sh test/templates/validate_project_templates.sh
# 3. 运行文档链接检查
sh tests/integration/check_doc_links.sh
sh test/integration/check_doc_links.sh
```
## 🧭 CI 自动化测试

View File

@ -1,42 +0,0 @@
import unittest
from pathlib import Path
ROOT = Path(__file__).resolve().parents[1]
CURATION = ROOT / "skills" / "thirdparty" / "thirdparty-skills.yml"
def read_text(path: Path) -> str:
return path.read_text(encoding="utf-8")
class ThirdpartySkillCurationTests(unittest.TestCase):
def test_architecture_skills_are_recorded_for_sync(self):
text = read_text(CURATION)
self.assertIn("id: brooks-lint", text)
self.assertIn("upstream_repo: https://github.com/hyhmrright/brooks-lint", text)
self.assertIn("architecture audit", text)
self.assertIn("sync: enabled", text)
self.assertIn("id: codebase-recon", text)
self.assertIn("upstream_repo: https://github.com/outfitter-dev/agents", text)
self.assertIn("upstream_paths:", text)
self.assertIn("plugins/outfitter/skills/codebase-recon", text)
self.assertIn("plugins/outfitter/skills/pathfinding", text)
self.assertIn("upstream_layout: multi_skill_subset", text)
self.assertIn("pathfinding/references/confidence.md", text)
self.assertIn("risk scan", text)
self.assertIn("id: codebase-migrate", text)
self.assertIn("upstream_repo: https://github.com/ComposioHQ/awesome-codex-skills", text)
self.assertIn("upstream_path: codebase-migrate", text)
self.assertIn("large codebase migrations", text)
self.assertIn("id: uncle-bob-craft", text)
self.assertIn("upstream_repo: https://github.com/sickn33/antigravity-awesome-skills", text)
self.assertIn("upstream_path: skills/uncle-bob-craft", text)
self.assertIn("design-pattern misuse checks", text)
if __name__ == "__main__":
unittest.main()