Add gpt engineer to ci (#78)

This commit is contained in:
merwanehamadi
2023-07-09 13:31:31 -07:00
committed by GitHub
parent d89264998d
commit 573130549f
4 changed files with 26 additions and 5 deletions

View File

@@ -5,6 +5,8 @@ on:
branches: [master]
push:
branches: [stable, master, ci-test*]
pull_request:
branches: [stable, master, ci-test*]
jobs:
regression-tests:
@@ -52,14 +54,30 @@ jobs:
poetry install --only main
poetry build
- name: Run regression tests
- 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/agbenchmark-0.1.0-py3-none-any.whl
agbenchmark start --maintain
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

View File

@@ -89,6 +89,9 @@ def start(category: str, maintain: bool, improve: bool, mock: bool) -> int:
if mock:
pytest_args.append("--mock")
# when used as a library, the pytest directory to execute is in the CURRENT_DIRECTORY
pytest_args.append(str(CURRENT_DIRECTORY))
return sys.exit(pytest.main(pytest_args))