docs: 中文部分全面汉化,添加 ClawHub 一键安装入口 #3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| - name: Validate JavaScript syntax | |
| run: | | |
| for file in skills/*/scripts/*.js; do | |
| node --check "$file" || exit 1 | |
| done | |
| - name: Validate JSON files | |
| run: | | |
| find . -name "*.json" -path "./skills/*" | while read -r file; do | |
| node -e "JSON.parse(require('fs').readFileSync(process.argv[1]))" -- "$file" || exit 1 | |
| echo " ✅ $file" | |
| done | |
| - name: Install test dependencies | |
| run: npm install | |
| - name: Run unit tests | |
| run: npm run test:unit | |
| - name: Run integration tests | |
| run: npm run test:integration | |
| - name: Run regression tests | |
| run: npm run test:regression | |
| - name: Run tests with coverage | |
| run: npm run test:coverage |