Add planner, memory, and agent loop #113
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: [push, pull_request] | |
| jobs: | |
| build-and-test: | |
| runs-on: ubuntu-latest | |
| services: | |
| redis: | |
| image: redis | |
| ports: | |
| - 6379:6379 | |
| options: >- | |
| --health-cmd "redis-cli ping" | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| env: | |
| CELERY_BROKER_URL: redis://localhost:6379/0 | |
| CELERY_RESULT_BACKEND: redis://localhost:6379/0 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| pip install -r test_requirements.txt | |
| - name: Wait for Redis to be healthy | |
| run: | | |
| for i in {1..10}; do | |
| if nc -z localhost 6379; then | |
| echo "Redis is up!" | |
| exit 0 | |
| fi | |
| echo "Waiting for Redis..." | |
| sleep 2 | |
| done | |
| echo "Redis did not start in time" | |
| exit 1 | |
| - name: Run tests | |
| run: pytest --maxfail=1 --disable-warnings -v | |
| - name: Start Celery worker | |
| run: | | |
| celery -A agentspring.celery_app.celery_app worker --loglevel=info & | |
| sleep 5 | |
| - name: Lint with flake8 | |
| run: | | |
| pip install flake8 | |
| flake8 agentspring/ --count --select=E9,F63,F7,F82 --show-source --statistics | |
| flake8 agentspring/ --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | |
| - name: Run tests with coverage | |
| run: | | |
| pip install pytest-cov | |
| pytest --cov=agentspring --cov-report=xml --cov-report=term-missing tests/ | |
| - name: Check coverage threshold | |
| run: | | |
| coverage report --fail-under=40 | |
| - name: Run example tests | |
| run: make test_examples |