name: AI Brain CI on: push: branches: [ "main" ] pull_request: branches: [ "main" ] jobs: build: runs-on: ubuntu-latest steps: - name: Checkout repo uses: actions/checkout@v3 - name: Set up Python uses: actions/setup-python@v4 with: python-version: "3.11" - name: Heal all files run: | echo "🔧 Healing scripts..." find . -type f -name "*.sh" -exec chmod +x {} \; find . -type f -exec dos2unix {} \; || true python3 -m compileall . || true - name: Verify sub-brains run: | echo "🧠 Checking sub-brains..." for brain in sub_brains/*; do if [ -x "$brain/launch.sh" ]; then echo "🚀 Launching $brain..." timeout 5s bash "$brain/launch.sh" > test.log 2>&1 || true if grep -q "❌" test.log; then echo "❌ Failure in $brain" cat test.log exit 1 fi echo "✅ $brain OK" fi done - name: Success run: echo "🎉 All sub-brains passed verification!"