Files
Auto-GPT/.github/workflows/gpt-engineer.yml
2023-07-09 13:31:31 -07:00

89 lines
2.6 KiB
YAML

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