Files
danghuangshang/.github/workflows/ci.yml
chairman's chair eccfa0fbeb fix: 修复 CI shellcheck warnings + 移除不存在的 install.sh 引用
- ci.yml: 移除对不存在的 install.sh 的引用
- doctor.sh: 移除未使用的 FIRST_GUILD 变量,修复 Python f-string 引号问题
- scripts/*.sh: 修复 SC2155 (declare and assign separately)
- scripts/*.sh: 移除未使用的变量 (SC2034)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-27 01:24:44 +08:00

51 lines
1.4 KiB
YAML

# [M-10] PR / push 触发的基本 CI 检查
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
jobs:
lint-and-validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Validate JSON files
run: |
echo "=== Validating JSON files ==="
ERRORS=0
for f in openclaw.example.json configs/*/openclaw.json; do
echo " Checking $f..."
if ! python3 -m json.tool "$f" > /dev/null 2>&1; then
echo " ❌ INVALID: $f"
ERRORS=$((ERRORS + 1))
fi
done
if [ "$ERRORS" -gt 0 ]; then
echo "❌ $ERRORS JSON files invalid"
exit 1
fi
echo "✅ All JSON files valid"
- name: ShellCheck install scripts
uses: ludeeus/action-shellcheck@2.0.0
with:
scandir: '.'
additional_files: 'install-lite.sh install-mac.sh doctor.sh keepalive.sh scripts/safe-update.sh scripts/switch-regime.sh scripts/init-personas.sh scripts/extract-personas.sh scripts/backup-all.sh scripts/memory-backup.sh'
severity: warning
- name: Check Dockerfile builds
run: docker build -t ai-court-test .
- name: GUI server syntax check
uses: actions/setup-node@v4
with:
node-version: 22
- run: node --check gui/server/index.js