Skip to content
This repository has been archived by the owner on Jun 9, 2024. It is now read-only.

Commit

Permalink
Combine all agents into one ci.yml (#79)
Browse files Browse the repository at this point in the history
Signed-off-by: Merwane Hamadi <merwanehamadi@gmail.com>
  • Loading branch information
waynehamadi authored Jul 10, 2023
1 parent 3d43117 commit 0fa5286
Show file tree
Hide file tree
Showing 6 changed files with 74 additions and 346 deletions.
64 changes: 0 additions & 64 deletions .github/workflows/autogpt.yml

This file was deleted.

76 changes: 74 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: Python CI
name: CI

on:
workflow_dispatch:
branches: [ master ]
schedule:
- cron: '0 8 * * *'
push:
branches: [ master, ci-test* ]
pull_request:
Expand All @@ -20,6 +24,7 @@ jobs:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
submodules: true

- name: Set up Python ${{ env.min-python-version }}
uses: actions/setup-python@v2
Expand Down Expand Up @@ -68,10 +73,18 @@ jobs:
if: success() || failure()

tests:

name: ${{ matrix.agent-name }}
runs-on: ubuntu-latest
env:
min-python-version: "3.10"
strategy:
fail-fast: false
matrix:
agent-name:
- "gpt-engineer"
- "Auto-GPT"
- "mini-agi"
- "smol-developer"

steps:
- name: Checkout repository
Expand All @@ -80,6 +93,7 @@ jobs:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
submodules: true

- name: Set up Python ${{ env.min-python-version }}
uses: actions/setup-python@v2
Expand Down Expand Up @@ -107,3 +121,61 @@ jobs:
poetry install
poetry run agbenchmark start --mock
poetry run agbenchmark start --mock --maintain
poetry build
- name: Run regression tests
run: |
cd agent/$AGENT_NAME
if [ "$AGENT_NAME" == "gpt-engineer" ]; then
make install
source venv/bin/activate
elif [ "$AGENT_NAME" == "Auto-GPT" ]; then
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
elif [ "$AGENT_NAME" == "mini-agi" ]; then
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
cp .env_example .env
elif [ "$AGENT_NAME" == "smol-developer" ]; then
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
elif [ "$AGENT_NAME" == "SuperAGI" ]; then
cp config_template.yaml config.yaml
sed -i 's/OPENAI_API_KEY:.*/OPENAI_API_KEY: "'"${{ secrets.OPENAI_API_KEY }}"'"/' config.yaml
docker-compose up -d --build
else
echo "Unknown agent name: $AGENT_NAME"
exit 1
fi
pip install ../../dist/*.whl
if [ "${GITHUB_EVENT_NAME}" == "schedule" ] || [ "${GITHUB_EVENT_NAME}" == "workflow_dispatch" ]; then
agbenchmark start --maintain
else
exit 0
agbenchmark start --maintain --mock
agbenchmark start --improve --mock
agbenchmark start --mock
agbenchmark start --mock --category=retrieval
agbenchmark start --mock --category=regression
agbenchmark start --mock --category=interface
agbenchmark start --mock --category=code
agbenchmark start --mock --category=memory
agbenchmark start --mock --category=memory --category=code
fi
env:
GITHUB_EVENT_NAME: ${{ github.event_name }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
AGENT_NAME: ${{ matrix.agent-name }}
PROMPT_USER: false # For mini-agi. TODO: Remove this once mini-agi follows the standards.

- name: Upload logs as artifact
if: always()
uses: actions/upload-artifact@v3
with:
name: gpt-engineer-projects
path: agent/gpt-engineer/projects
88 changes: 0 additions & 88 deletions .github/workflows/gpt-engineer.yml

This file was deleted.

66 changes: 0 additions & 66 deletions .github/workflows/mini-agi.yml

This file was deleted.

64 changes: 0 additions & 64 deletions .github/workflows/smol-developer.yml

This file was deleted.

Loading

0 comments on commit 0fa5286

Please sign in to comment.