Autogpts ci unified for the hackathon (#5218)

AutoGPTs CI parametrized
This commit is contained in:
merwanehamadi
2023-09-14 09:11:45 -07:00
committed by GitHub
parent 35e0184ca9
commit a1284336ba
3 changed files with 15 additions and 23 deletions

View File

@@ -1,4 +1,4 @@
name: AutoGPTs CI name: Valid AutoGPTs
on: on:
workflow_dispatch: workflow_dispatch:
@@ -8,17 +8,19 @@ on:
push: push:
branches: [master, ci-test*] branches: [master, ci-test*]
paths: paths:
- 'autogpts/forge/**' - 'autogpts/**'
- '.github/workflows/autogpts-ci.yml'
pull_request: pull_request:
branches: [stable, master, release-*] branches: [stable, master, release-*]
paths: paths:
- 'autogpts/forge/**' - 'autogpts/**'
- '.github/workflows/autogpts-ci.yml'
jobs: jobs:
agent-protocol-test: run-tests:
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy:
matrix:
agent-name: [ autogpt, forge ]
fail-fast: false
timeout-minutes: 20 timeout-minutes: 20
steps: steps:
- name: Checkout repository - name: Checkout repository
@@ -35,14 +37,14 @@ jobs:
python-version: ${{ env.min-python-version }} python-version: ${{ env.min-python-version }}
- name: Install Poetry - name: Install Poetry
working-directory: ./autogpts/forge/ working-directory: ./autogpts/${{ matrix.agent-name }}/
run: | run: |
curl -sSL https://install.python-poetry.org | python - curl -sSL https://install.python-poetry.org | python -
- name: Run regression tests - name: Run regression tests
working-directory: ./autogpts/forge/ working-directory: ./autogpts/${{ matrix.agent-name }}/
run: | run: |
sh run_agent.sh sh run
URL=http://127.0.0.1:8000 bash -c "$(curl -fsSL https://raw.githubusercontent.com/AI-Engineers-Foundation/agent-protocol/main/testing_suite/test.sh)" URL=http://127.0.0.1:8000 bash -c "$(curl -fsSL https://raw.githubusercontent.com/AI-Engineers-Foundation/agent-protocol/main/testing_suite/test.sh)"
poetry run agbenchmark start --mock poetry run agbenchmark start --mock
poetry run agbenchmark start --test=TestWriteFile poetry run agbenchmark start --test=TestWriteFile

View File

@@ -1,8 +1,4 @@
#!/bin/bash kill $(lsof -t -i :8000)
poetry install
cp .env.example .env
poetry run python -m forge &
# poetry install
# poetry shell
export PYTHONPATH=$PYTHONPATH:$PWD; watchmedo auto-restart -p "*.py" -R python3 -- autogpt/__main__.py "$@"

View File

@@ -1,6 +0,0 @@
kill $(lsof -t -i :8000)
poetry install
cp .env.example .env
pip uninstall agbenchmark
pip install -e ../../benchmark
poetry run python -m forge &