78 lines
2.2 KiB
YAML
78 lines
2.2 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [ main, develop ]
|
|
pull_request:
|
|
branches: [ main ]
|
|
|
|
jobs:
|
|
shellcheck:
|
|
name: ShellCheck
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Run ShellCheck
|
|
uses: ludeeus/action-shellcheck@master
|
|
with:
|
|
scandir: './scripts'
|
|
severity: warning
|
|
|
|
test:
|
|
name: Test Suite
|
|
runs-on: macos-latest
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
brew install tmux
|
|
|
|
- name: Make scripts executable
|
|
run: chmod +x scripts/*.sh
|
|
|
|
- name: Run test suite
|
|
run: |
|
|
# Mock OpenClaw commands for testing
|
|
echo '#!/bin/bash\necho "OpenClaw mock"' > /usr/local/bin/openclaw
|
|
chmod +x /usr/local/bin/openclaw
|
|
|
|
# Run tests (may fail on some checks, but that's OK for CI)
|
|
./scripts/test-self-healing.sh || true
|
|
|
|
- name: Check syntax
|
|
run: |
|
|
bash -n scripts/gateway-healthcheck.sh
|
|
bash -n scripts/emergency-recovery.sh
|
|
bash -n scripts/emergency-recovery-monitor.sh
|
|
bash -n scripts/test-self-healing.sh
|
|
|
|
docs:
|
|
name: Documentation Check
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Check required files
|
|
run: |
|
|
test -f README.md || { echo "README.md missing"; exit 1; }
|
|
test -f LICENSE || { echo "LICENSE missing"; exit 1; }
|
|
test -f .env.example || { echo ".env.example missing"; exit 1; }
|
|
test -f docs/QUICKSTART.md || { echo "QUICKSTART.md missing"; exit 1; }
|
|
test -f docs/TROUBLESHOOTING.md || { echo "TROUBLESHOOTING.md missing"; exit 1; }
|
|
test -f docs/CONTRIBUTING.md || { echo "CONTRIBUTING.md missing"; exit 1; }
|
|
|
|
- name: Check markdown links
|
|
uses: gaurav-nelson/github-action-markdown-link-check@v1
|
|
with:
|
|
use-quiet-mode: 'yes'
|
|
config-file: '.github/markdown-link-check.json'
|
|
continue-on-error: true
|