# ============================================================================== # Gitea Actions CI/CD Workflow Template # ============================================================================== # Place this file in '.gitea/workflows/ci.yml' or use it directly in Gitea's CI. # It automatically validates shell scripts and checks Python formatting/syntax. # ============================================================================== name: Multi-Agent Mux CI on: push: branches: [ main, dev ] pull_request: branches: [ main ] jobs: lint-shell: name: Lint Shell Scripts runs-on: ubuntu-latest steps: - name: Checkout Code uses: actions/checkout@v3 - name: Install ShellCheck run: | sudo apt-get update sudo apt-get install -y shellcheck - name: Run ShellCheck run: | echo "๐Ÿ” Linting shell scripts..." shellcheck .agents/skills/lib.sh shellcheck .agents/skills/multi-agent-mux-create/scripts/create_session.sh shellcheck .agents/skills/multi-agent-mux-stop/scripts/stop_session.sh shellcheck .agents/skills/multi-agent-mux-monitor/scripts/reconcile.sh shellcheck .agents/skills/multi-agent-mux-loop/scripts/run_loop.sh shellcheck .agents/skills/multi-agent-mux-loop/scripts/diff_collect.sh shellcheck .agents/skills/multi-agent-mux-loop/scripts/loop_lock.sh shellcheck .agents/skills/multi-agent-mux-orc-onboard/scripts/orc_onboard.sh shellcheck .agents/hooks/loop_delegation_guard.sh shellcheck deploy/lib_ownership.sh shellcheck deploy/install.sh shellcheck deploy/install_mam.sh shellcheck deploy/generate-env.sh shellcheck deploy/update.sh shellcheck deploy/remove.sh echo "โœ… ShellCheck completed successfully." lint-python: name: Lint Python Backplane runs-on: ubuntu-latest steps: - name: Checkout Code uses: actions/checkout@v3 - name: Set up Python uses: actions/setup-python@v4 with: python-version: '3.10' cache: 'pip' - name: Install Dependencies run: | python -m pip install --upgrade pip pip install flake8 pylint if [ -f .agents/skills/multi-agent-mux-delegate-job/requirements.txt ]; then pip install -r .agents/skills/multi-agent-mux-delegate-job/requirements.txt fi - name: Run Flake8 (Syntax/Error Check) run: | echo "๐Ÿ” Checking Python syntax with flake8..." flake8 .agents/skills/multi-agent-mux-delegate-job/scripts/ .agents/skills/lib_py/ --count --select=E9,F63,F7,F82 --show-source --statistics # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide flake8 .agents/skills/multi-agent-mux-delegate-job/scripts/ .agents/skills/lib_py/ --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - name: Run Python Syntax Check (Compile test) run: | echo "๐Ÿ” Verifying Python file compilation..." python -m py_compile .agents/skills/multi-agent-mux-delegate-job/scripts/*.py .agents/skills/lib_py/*.py echo "โœ… All Python files compiled successfully." test: name: Run Test Suite runs-on: ubuntu-latest steps: - name: Checkout Code uses: actions/checkout@v3 - name: Set up Python uses: actions/setup-python@v4 with: python-version: '3.10' cache: 'pip' - name: Install Test Dependencies run: | python -m pip install --upgrade pip if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt else pip install pytest fi if [ -f .agents/skills/multi-agent-mux-delegate-job/requirements.txt ]; then pip install -r .agents/skills/multi-agent-mux-delegate-job/requirements.txt fi - name: Run Pytest run: | echo "๐Ÿงช Running full test suite..." pytest tests/ -q