📝 docs(tsl): clarify syntax constraints and enhance test infrastructure
- Add TSF file naming constraint to syntax/02_core_model.md - Clarify semicolon rules: syntax facts vs style preferences - Separate control flow end semicolon rules (syntax allows both) - Add function body semicolon requirements to syntax/05_functions_and_calls.md - Move style preferences to code_style.md (control flow end semicolons) - Remove cross-references from syntax docs to maintain independence - Enhance Gitea workflow emoji for better CI output readability - Fix CI test path from tests/ to test/ - Organize agent test results under test/agent/result/ directory - Add complete Chinese translation of test cases (test_cases_zh.md) - Clean up .gitignore to use unified test/agent/result/ directory - Remove obsolete agent test artifacts (REPORTS_LOCATION.md, old results) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -27,7 +27,7 @@ jobs:
|
||||
set -euo pipefail
|
||||
|
||||
echo "========================================"
|
||||
echo "📥 准备仓库到 WORKSPACE_DIR"
|
||||
echo "📦 准备仓库到 WORKSPACE_DIR"
|
||||
echo "========================================"
|
||||
|
||||
REPO_NAME="${{ github.event.repository.name }}"
|
||||
@@ -60,10 +60,14 @@ jobs:
|
||||
|
||||
git config --global --add safe.directory "$REPO_DIR"
|
||||
echo "REPO_DIR=$REPO_DIR" >> "$GITHUB_ENV"
|
||||
- name: 🧪 Lint commit message / PR title
|
||||
echo "✅ 仓库准备完成"
|
||||
|
||||
- name: 🔍 Lint commit message / PR title
|
||||
run: |
|
||||
cd "$REPO_DIR"
|
||||
echo "🔍 检查 commit message 和 PR title 规范..."
|
||||
python3 .gitea/ci/commit_message_lint.py
|
||||
echo "✅ Lint 检查通过"
|
||||
|
||||
- name: 🧹 清理临时仓库
|
||||
if: always()
|
||||
|
||||
@@ -35,7 +35,7 @@ jobs:
|
||||
set -euo pipefail
|
||||
|
||||
echo "========================================"
|
||||
echo "📥 准备仓库到 WORKSPACE_DIR"
|
||||
echo "📦 准备仓库到 WORKSPACE_DIR"
|
||||
echo "========================================"
|
||||
|
||||
REPO_NAME="${{ github.event.repository.name }}"
|
||||
@@ -69,11 +69,12 @@ jobs:
|
||||
|
||||
git config --global --add safe.directory "$REPO_DIR"
|
||||
echo "REPO_DIR=$REPO_DIR" >> "$GITHUB_ENV"
|
||||
echo "✅ 仓库准备完成"
|
||||
|
||||
- name: 🔧 安装测试依赖
|
||||
run: |
|
||||
echo "========================================"
|
||||
echo "🔧 安装测试依赖"
|
||||
echo "📦 安装测试依赖"
|
||||
echo "========================================"
|
||||
|
||||
apt-get update
|
||||
@@ -83,7 +84,8 @@ jobs:
|
||||
python3 -m pip install yamllint tomli
|
||||
|
||||
echo ""
|
||||
echo "✓ Python 版本: $(python3 --version)"
|
||||
echo "✅ Python 版本: $(python3 --version)"
|
||||
echo "✅ 依赖安装完成"
|
||||
echo "========================================"
|
||||
|
||||
- name: 🧪 运行全量测试并生成报告
|
||||
@@ -92,27 +94,31 @@ jobs:
|
||||
set -euo pipefail
|
||||
|
||||
echo "========================================"
|
||||
echo "🧪 Python 测试"
|
||||
echo "🐍 Python 测试"
|
||||
echo "========================================"
|
||||
|
||||
cd "$REPO_DIR"
|
||||
echo "覆盖:CLI、subtree/snapshot 部署路线、模板同步、文档一致性"
|
||||
python3 -m unittest discover -s tests -p "test_*.py" -v
|
||||
echo "📋 覆盖:CLI、subtree/snapshot 部署路线、模板同步、文档一致性"
|
||||
python3 -m unittest discover -s test -p "test_*.py" -v
|
||||
echo "✅ Python 测试通过"
|
||||
|
||||
echo "========================================"
|
||||
echo "📄 模板验证测试"
|
||||
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
|
||||
echo "✅ 模板验证通过"
|
||||
|
||||
echo "========================================"
|
||||
echo "🔗 文档链接检查"
|
||||
echo "========================================"
|
||||
|
||||
sh tests/integration/check_doc_links.sh
|
||||
echo "✅ 文档链接检查通过"
|
||||
echo "🎉 所有测试完成"
|
||||
|
||||
- name: 🧹 清理临时仓库
|
||||
if: always()
|
||||
|
||||
@@ -29,7 +29,7 @@ jobs:
|
||||
set -euo pipefail
|
||||
|
||||
echo "========================================"
|
||||
echo "🧰 Prepare repo in WORKSPACE_DIR"
|
||||
echo "📦 Prepare repo in WORKSPACE_DIR"
|
||||
echo "========================================"
|
||||
|
||||
REPO_NAME="${{ github.event.repository.name }}"
|
||||
@@ -49,6 +49,7 @@ jobs:
|
||||
|
||||
git config --global --add safe.directory "$REPO_DIR"
|
||||
echo "REPO_DIR=$REPO_DIR" >> "$GITHUB_ENV"
|
||||
echo "✅ Repo prepared"
|
||||
|
||||
- name: ♻️ Update thirdparty and sync main
|
||||
shell: bash
|
||||
@@ -81,7 +82,7 @@ jobs:
|
||||
fi
|
||||
|
||||
echo "========================================"
|
||||
echo "🚀 Sync skills into main"
|
||||
echo "🔄 Sync skills into main"
|
||||
echo "========================================"
|
||||
|
||||
git fetch origin main
|
||||
@@ -92,7 +93,7 @@ jobs:
|
||||
MANIFEST_PATH="$MANIFEST_PATH" \
|
||||
bash .gitea/ci/sync_thirdparty_skills.sh
|
||||
|
||||
echo "🎉 Update and sync finished."
|
||||
echo "✅ Update and sync finished."
|
||||
|
||||
- name: 🧹 Clean temporary repo
|
||||
if: always()
|
||||
|
||||
Reference in New Issue
Block a user