From 5f93fede3d9cb2b743d30cf152e5b915da05928b Mon Sep 17 00:00:00 2001 From: Juan Miguel <94069179+juan-miii@users.noreply.github.com> Date: Wed, 19 Mar 2025 14:22:11 +0100 Subject: [PATCH] Enable Dependabot & CI (#66) * Create dependabot.yml Currently watches for updates in github actions, and current iteration, present in the root folder. Commented expansion on how to maintain previous iterations addded. * CI for local development * CI for docker build * Use matrix strategy on docker build Docker version uses 3.12, so its interesting to ensure it properly works with this version * Enable python 3.10 backporting --- .github/dependabot.yml | 58 +++++++++++++++++++++ .github/workflows/build.yml | 100 ++++++++++++++++++++++++++++++++++++ 2 files changed, 158 insertions(+) create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/build.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..4dcb911e --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,58 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for all configuration options: +# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file + +version: 2 +updates: + + # Check for updates to GitHub Actions + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" + + # Check for updates to Python packages in root (actual iteration) + - package-ecosystem: "pip" + directory: "/" + schedule: + interval: "weekly" + + # Check for updates to Python packages in mcp + - package-ecosystem: "pip" + directory: "/mcp" + schedule: + interval: "weekly" + + # Check for updates in Dockerfile + - package-ecosystem: "docker" + directory: "/" + schedule: + interval: "weekly" + + # Check for updates in MCP Dockerfile + - package-ecosystem: "docker" + directory: "/mcp" + schedule: + interval: "weekly" + + + # Aditional: Structure to maintain previous iterations + + # Update Version 1: Single Agent + # - package-ecosystem: "pip" + # directory: "/iterations/v1-single-agent" + # schedule: + # interval: "monthly" + + # Update Version 2: Agentic Workflow + # - package-ecosystem: "pip" + # directory: "/iterations/v2-agentic-workflow" + # schedule: + # interval: "monthly" + + # Upate Version 3: MCP Support + # - package-ecosystem: "pip" + # directory: "/iterations/v3-mcp-support" + # schedule: + # interval: "monthly" diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..4890835d --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,100 @@ +name: Build Archon + +on: + push: + branches: + [ main, master ] + pull_request: + branches: + [ main, master ] + +permissions: + contents: read + +jobs: + build-locally: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ['3.10', '3.11', '3.12', '3.13'] + include: + - python-version: '3.10' + experimental: true + - python-version: '3.12' + experimental: true + - python-version: '3.13' + experimental: true + fail-fast: false + + # Test on newer Python versions + continue-on-error: ${{ matrix.experimental || false }} + steps: + - name: Checkout code + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 + with: + python-version: ${{ matrix.python-version }} + + - name: Install dependencies + run: | + python -m venv venv + source venv/bin/activate + pip install -r requirements.txt + + - name: Verify code compilation + run: | + source venv/bin/activate + python -m compileall -f . + + build-docker: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ['3.10', '3.11', '3.12', '3.13'] + include: + - python-version: '3.10' + experimental: true + - python-version: '3.13' + experimental: true + fail-fast: false + + # Test on newer Python versions + continue-on-error: ${{ matrix.experimental || false }} + steps: + - name: Checkout code + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 + with: + python-version: ${{ matrix.python-version }} + + - name: Modify run_docker.py for CI environment + run: | + cp run_docker.py run_docker_ci.py + # Modify the script to just build and verify containers without running them indefinitely + sed -i 's/"-d",/"-d", "--rm",/g' run_docker_ci.py + + - name: Run Docker setup script + run: | + chmod +x run_docker_ci.py + python run_docker_ci.py + + - name: Verify containers are built + run: | + docker images | grep archon + docker images | grep archon-mcp + + - name: Test container running status + run: | + docker ps -a | grep archon-container + + - name: Stop containers + run: | + docker stop archon-container || true + docker rm archon-container || true + docker stop archon-mcp || true + docker rm archon-mcp || true + docker ps -a | grep archon || echo "All containers successfully removed"