first commit
This commit is contained in:
58
文档润色流和知识库构建流/claude-scholar/.github/workflows/installer_smoke.yml
vendored
Normal file
58
文档润色流和知识库构建流/claude-scholar/.github/workflows/installer_smoke.yml
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
name: installer-smoke
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- codex
|
||||
- opencode
|
||||
|
||||
jobs:
|
||||
installer-smoke:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Verify installer entrypoints exist
|
||||
run: |
|
||||
set -euo pipefail
|
||||
test -f scripts/setup.sh
|
||||
test -f scripts/uninstall.sh
|
||||
test -f scripts/test_install_uninstall.sh
|
||||
test -f README.md
|
||||
test -f README.zh-CN.md
|
||||
test -f README.ja-JP.md
|
||||
|
||||
- name: Syntax check installer scripts
|
||||
run: bash -n scripts/setup.sh
|
||||
|
||||
- name: Run install/uninstall smoke tests
|
||||
run: bash scripts/test_install_uninstall.sh
|
||||
|
||||
- name: Verify branch-specific top-level docs exist
|
||||
run: |
|
||||
set -euo pipefail
|
||||
if [ -f CLAUDE.md ]; then
|
||||
test -f CLAUDE.zh-CN.md
|
||||
test -f CLAUDE.ja-JP.md
|
||||
fi
|
||||
if [ -f AGENTS.md ]; then
|
||||
test -f AGENTS.md
|
||||
fi
|
||||
test -f MCP_SETUP.md
|
||||
test -f MCP_SETUP.zh-CN.md
|
||||
test -f MCP_SETUP.ja-JP.md
|
||||
test -f OBSIDIAN_SETUP.md
|
||||
test -f OBSIDIAN_SETUP.zh-CN.md
|
||||
test -f OBSIDIAN_SETUP.ja-JP.md
|
||||
|
||||
- name: Verify key skills still exist
|
||||
run: |
|
||||
set -euo pipefail
|
||||
test -f skills/research-ideation/SKILL.md
|
||||
test -f skills/results-analysis/SKILL.md
|
||||
test -f skills/results-report/SKILL.md
|
||||
test -f skills/ml-paper-writing/SKILL.md
|
||||
test -f skills/publication-chart-skill/SKILL.md
|
||||
65
文档润色流和知识库构建流/claude-scholar/.github/workflows/repo_sanity.yml
vendored
Normal file
65
文档润色流和知识库构建流/claude-scholar/.github/workflows/repo_sanity.yml
vendored
Normal file
@@ -0,0 +1,65 @@
|
||||
name: repo-sanity
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- codex
|
||||
- opencode
|
||||
|
||||
jobs:
|
||||
repo-sanity:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Check tracked top-level docs for obvious machine-specific paths
|
||||
run: |
|
||||
set -euo pipefail
|
||||
python3 - <<'PY'
|
||||
import re
|
||||
import subprocess
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
tracked = subprocess.check_output(['git', 'ls-files'], text=True).splitlines()
|
||||
allowed = {
|
||||
'README.md', 'README.zh-CN.md', 'README.ja-JP.md',
|
||||
'CLAUDE.md', 'CLAUDE.zh-CN.md', 'CLAUDE.ja-JP.md',
|
||||
'AGENTS.md',
|
||||
'MCP_SETUP.md', 'MCP_SETUP.zh-CN.md', 'MCP_SETUP.ja-JP.md',
|
||||
'OBSIDIAN_SETUP.md', 'OBSIDIAN_SETUP.zh-CN.md', 'OBSIDIAN_SETUP.ja-JP.md',
|
||||
'settings.json.template',
|
||||
'.github/PULL_REQUEST_TEMPLATE.md',
|
||||
'.github/ISSUE_TEMPLATE/bug_report.yml',
|
||||
'.github/ISSUE_TEMPLATE/workflow_gap.yml',
|
||||
'.github/ISSUE_TEMPLATE/docs_problem.yml',
|
||||
'.github/ISSUE_TEMPLATE/config.yml',
|
||||
}
|
||||
pattern = re.compile(r'/Users/[A-Za-z0-9_.-]+|/home/[A-Za-z0-9_.-]+|[A-Za-z]:\\Users\\[A-Za-z0-9_. -]+')
|
||||
bad = []
|
||||
for rel in tracked:
|
||||
if rel not in allowed:
|
||||
continue
|
||||
try:
|
||||
text = Path(rel).read_text(encoding='utf-8')
|
||||
except Exception:
|
||||
continue
|
||||
if pattern.search(text):
|
||||
bad.append(rel)
|
||||
if bad:
|
||||
print('Found machine-specific paths in:')
|
||||
for rel in bad:
|
||||
print(rel)
|
||||
sys.exit(1)
|
||||
PY
|
||||
|
||||
- name: Check tracked junk files
|
||||
run: |
|
||||
set -euo pipefail
|
||||
if git ls-files | rg '(^|/)(\.DS_Store|Thumbs\.db|desktop\.ini)$'; then
|
||||
echo "Tracked junk files detected."
|
||||
exit 1
|
||||
fi
|
||||
Reference in New Issue
Block a user