Migration from Docker to Standalone Python Server (#73)

* Migration from docker to standalone server
Migration handling
Fixed tests
Use simpler in-memory storage
Support for concurrent logging to disk
Simplified direct connections to localhost

* Migration from docker / redis to standalone script
Updated tests
Updated run script
Fixed requirements
Use dotenv
Ask if user would like to install MCP in Claude Desktop once
Updated docs

* More cleanup and references to docker removed

* Cleanup

* Comments

* Fixed tests

* Fix GitHub Actions workflow for standalone Python architecture

- Install requirements-dev.txt for pytest and testing dependencies
- Remove Docker setup from simulation tests (now standalone)
- Simplify linting job to use requirements-dev.txt
- Update simulation tests to run directly without Docker

Fixes unit test failures in CI due to missing pytest dependency.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Remove simulation tests from GitHub Actions

- Removed simulation-tests job that makes real API calls
- Keep only unit tests (mocked, no API costs) and linting
- Simulation tests should be run manually with real API keys
- Reduces CI costs and complexity

GitHub Actions now only runs:
- Unit tests (569 tests, all mocked)
- Code quality checks (ruff, black)

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Fixed tests

* Fixed tests

---------

Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
Beehive Innovations
2025-06-18 23:41:22 +04:00
committed by GitHub
parent 9d72545ecd
commit 4151c3c3a5
121 changed files with 2842 additions and 3168 deletions

View File

@@ -25,6 +25,7 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements-dev.txt
- name: Run unit tests
run: |
@@ -49,7 +50,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install ruff black
pip install -r requirements-dev.txt
- name: Run black formatter check
run: black --check .
@@ -57,61 +58,3 @@ jobs:
- name: Run ruff linter
run: ruff check .
simulation-tests:
runs-on: ubuntu-latest
# Only run simulation tests on main branch pushes (requires manual API key setup)
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Check API key availability
id: check-key
run: |
has_key=false
if [ -n "${{ secrets.GEMINI_API_KEY }}" ] || [ -n "${{ secrets.OPENAI_API_KEY }}" ]; then
has_key=true
echo "✅ API key(s) found - running simulation tests"
else
echo "⚠️ No API keys configured - skipping simulation tests"
fi
echo "api_key_available=$has_key" >> $GITHUB_OUTPUT
- name: Set up Docker
if: steps.check-key.outputs.api_key_available == 'true'
uses: docker/setup-buildx-action@v3
- name: Build Docker image
if: steps.check-key.outputs.api_key_available == 'true'
run: |
docker compose build
- name: Run simulation tests
if: steps.check-key.outputs.api_key_available == 'true'
run: |
# Start services
docker compose up -d
# Wait for services to be ready
sleep 10
# Run communication simulator tests
python communication_simulator_test.py --skip-docker
env:
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
- name: Skip simulation tests
if: steps.check-key.outputs.api_key_available == 'false'
run: |
echo "🔒 Simulation tests skipped (no API keys configured)"
echo "To enable simulation tests, add GEMINI_API_KEY and/or OPENAI_API_KEY as repository secrets"