diff --git a/.github/workflows/gpt-engineer.yml b/.github/workflows/gpt-engineer.yml index a39165482..833026e8e 100644 --- a/.github/workflows/gpt-engineer.yml +++ b/.github/workflows/gpt-engineer.yml @@ -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 diff --git a/agbenchmark/start_benchmark.py b/agbenchmark/start_benchmark.py index f78e86a1c..68c7932be 100644 --- a/agbenchmark/start_benchmark.py +++ b/agbenchmark/start_benchmark.py @@ -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)) diff --git a/agent/Auto-GPT b/agent/Auto-GPT index 5a36e43b7..cec424ad2 160000 --- a/agent/Auto-GPT +++ b/agent/Auto-GPT @@ -1 +1 @@ -Subproject commit 5a36e43b782fdaef8a7270109f8347f0323211d2 +Subproject commit cec424ad2504020a830c3af9f74536a420545931 diff --git a/agent/gpt-engineer b/agent/gpt-engineer index fd705f89a..4af8c137e 160000 --- a/agent/gpt-engineer +++ b/agent/gpt-engineer @@ -1 +1 @@ -Subproject commit fd705f89afd53469c91935a9cae7b92a564025eb +Subproject commit 4af8c137e82cc51fdd31c23327ceffd64194b984