mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2025-12-28 19:34:30 +01:00
Combine all agents into one ci.yml (#79)
Signed-off-by: Merwane Hamadi <merwanehamadi@gmail.com>
This commit is contained in:
64
.github/workflows/autogpt.yml
vendored
64
.github/workflows/autogpt.yml
vendored
@@ -1,64 +0,0 @@
|
||||
name: Auto-GPT Regression Test
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
branches: [master]
|
||||
push:
|
||||
branches: [stable, master, ci-test*]
|
||||
|
||||
jobs:
|
||||
regression-tests:
|
||||
permissions:
|
||||
pull-requests: write
|
||||
contents: write
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: ['3.10']
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
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 ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
|
||||
- id: get_date
|
||||
name: Get date
|
||||
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Install Poetry
|
||||
run: |
|
||||
curl -sSL https://install.python-poetry.org | python -
|
||||
|
||||
- name: Set up Poetry cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: |
|
||||
~/.cache/pypoetry
|
||||
.venv
|
||||
key: ${{ runner.os }}-poetry-${{ hashFiles('**/pyproject.toml') }}-${{ hashFiles('**/poetry.lock') }}-${{ steps.get_date.outputs.date }}
|
||||
|
||||
- name: Set up venv and install Python dependencies
|
||||
run: |
|
||||
poetry install --only main
|
||||
poetry build
|
||||
|
||||
- name: Run regression tests
|
||||
run: |
|
||||
python -m venv venv
|
||||
source venv/bin/activate
|
||||
cd agent/Auto-GPT
|
||||
pip install -r requirements.txt
|
||||
pip install ../../dist/agbenchmark-0.1.0-py3-none-any.whl
|
||||
agbenchmark start --maintain
|
||||
env:
|
||||
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
|
||||
76
.github/workflows/ci.yml
vendored
76
.github/workflows/ci.yml
vendored
@@ -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:
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
.github/workflows/gpt-engineer.yml
vendored
88
.github/workflows/gpt-engineer.yml
vendored
@@ -1,88 +0,0 @@
|
||||
name: gpt-engineer Regression Test
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
branches: [master]
|
||||
push:
|
||||
branches: [stable, master, ci-test*]
|
||||
pull_request:
|
||||
branches: [stable, master, ci-test*]
|
||||
|
||||
jobs:
|
||||
regression-tests:
|
||||
permissions:
|
||||
pull-requests: write
|
||||
contents: write
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: ['3.10']
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
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 ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
|
||||
- id: get_date
|
||||
name: Get date
|
||||
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Install Poetry
|
||||
run: |
|
||||
curl -sSL https://install.python-poetry.org | python -
|
||||
|
||||
- name: Set up Poetry cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: |
|
||||
~/.cache/pypoetry
|
||||
.venv
|
||||
key: ${{ runner.os }}-poetry-${{ hashFiles('**/pyproject.toml') }}-${{ hashFiles('**/poetry.lock') }}-${{ steps.get_date.outputs.date }}
|
||||
|
||||
- name: Set up venv and install Python dependencies
|
||||
run: |
|
||||
poetry install --only main
|
||||
poetry build
|
||||
|
||||
- name: Run regression tests (push)
|
||||
if: ${{ github.event_name != 'pull_request' }}
|
||||
run: |
|
||||
cd agent/gpt-engineer
|
||||
make install
|
||||
source venv/bin/activate
|
||||
pip install ../../dist/*.whl
|
||||
|
||||
if [ "${GITHUB_EVENT_NAME}" != "pull_request" ]; then
|
||||
agbenchmark start --maintain
|
||||
else
|
||||
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 }}
|
||||
|
||||
- name: Upload logs as artifact
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: gpt-engineer-projects
|
||||
path: agent/gpt-engineer/projects
|
||||
66
.github/workflows/mini-agi.yml
vendored
66
.github/workflows/mini-agi.yml
vendored
@@ -1,66 +0,0 @@
|
||||
name: mini-agi Regression Test
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
branches: [master]
|
||||
push:
|
||||
branches: [stable, master, ci-test*]
|
||||
|
||||
jobs:
|
||||
regression-tests:
|
||||
permissions:
|
||||
pull-requests: write
|
||||
contents: write
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: ['3.10']
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
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 ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
|
||||
- id: get_date
|
||||
name: Get date
|
||||
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Install Poetry
|
||||
run: |
|
||||
curl -sSL https://install.python-poetry.org | python -
|
||||
|
||||
- name: Set up Poetry cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: |
|
||||
~/.cache/pypoetry
|
||||
.venv
|
||||
key: ${{ runner.os }}-poetry-${{ hashFiles('**/pyproject.toml') }}-${{ hashFiles('**/poetry.lock') }}-${{ steps.get_date.outputs.date }}
|
||||
|
||||
- name: Set up venv and install Python dependencies
|
||||
run: |
|
||||
poetry install --only main
|
||||
poetry build
|
||||
|
||||
- name: Run regression tests
|
||||
run: |
|
||||
cd agent/mini-agi
|
||||
python -m venv venv
|
||||
source venv/bin/activate
|
||||
pip install -r requirements.txt
|
||||
cp .env_example .env
|
||||
pip install ../../dist/agbenchmark-0.1.0-py3-none-any.whl
|
||||
agbenchmark start --maintain
|
||||
env:
|
||||
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
|
||||
PROMPT_USER: false
|
||||
64
.github/workflows/smol-developer.yml
vendored
64
.github/workflows/smol-developer.yml
vendored
@@ -1,64 +0,0 @@
|
||||
name: smol developer Regression Test
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
branches: [master]
|
||||
push:
|
||||
branches: [stable, master, ci-test*]
|
||||
|
||||
jobs:
|
||||
regression-tests:
|
||||
permissions:
|
||||
pull-requests: write
|
||||
contents: write
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: ['3.10']
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
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 ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
|
||||
- id: get_date
|
||||
name: Get date
|
||||
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Install Poetry
|
||||
run: |
|
||||
curl -sSL https://install.python-poetry.org | python -
|
||||
|
||||
- name: Set up Poetry cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: |
|
||||
~/.cache/pypoetry
|
||||
.venv
|
||||
key: ${{ runner.os }}-poetry-${{ hashFiles('**/pyproject.toml') }}-${{ hashFiles('**/poetry.lock') }}-${{ steps.get_date.outputs.date }}
|
||||
|
||||
- name: Set up venv and install Python dependencies
|
||||
run: |
|
||||
poetry install --only main
|
||||
poetry build
|
||||
|
||||
- name: Run regression tests
|
||||
run: |
|
||||
cd agent/smol-developer
|
||||
python -m venv venv
|
||||
source venv/bin/activate
|
||||
pip install -r requirements.txt
|
||||
pip install ../../dist/agbenchmark-0.1.0-py3-none-any.whl
|
||||
agbenchmark start --maintain
|
||||
env:
|
||||
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
|
||||
62
.github/workflows/superagi.yml
vendored
62
.github/workflows/superagi.yml
vendored
@@ -1,62 +0,0 @@
|
||||
name: SuperAgi Regression Test
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
branches: [master]
|
||||
push:
|
||||
branches: [stable, master, ci-test*]
|
||||
|
||||
jobs:
|
||||
regression-tests:
|
||||
permissions:
|
||||
pull-requests: write
|
||||
contents: write
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: ['3.10']
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
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 ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
|
||||
- id: get_date
|
||||
name: Get date
|
||||
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Install Poetry
|
||||
run: |
|
||||
curl -sSL https://install.python-poetry.org | python -
|
||||
|
||||
- name: Set up Poetry cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: |
|
||||
~/.cache/pypoetry
|
||||
.venv
|
||||
key: ${{ runner.os }}-poetry-${{ hashFiles('**/pyproject.toml') }}-${{ hashFiles('**/poetry.lock') }}-${{ steps.get_date.outputs.date }}
|
||||
|
||||
- name: Set up venv and install Python dependencies
|
||||
run: |
|
||||
poetry install --only main
|
||||
poetry build
|
||||
|
||||
- name: Run regression tests
|
||||
run: |
|
||||
cd agent/SuperAGI
|
||||
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
|
||||
pip install ../../dist/agbenchmark-0.1.0-py3-none-any.whl
|
||||
agbenchmark start --maintain
|
||||
Reference in New Issue
Block a user