Merge pull request #2625 from Significant-Gravitas/stable-0.2.2

Stable 0.2.2 into Stable ready for release
This commit is contained in:
Richard Beales
2023-04-20 06:02:22 +01:00
committed by GitHub
102 changed files with 2420 additions and 4712 deletions

31
.github/workflows/benchmark.yml vendored Normal file
View File

@@ -0,0 +1,31 @@
name: benchmark
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
environment: benchmark
strategy:
matrix:
python-version: ['3.10', '3.11']
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: benchmark
run: |
python benchmark/benchmark_entrepeneur_gpt_with_undecisive_user.py
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}

View File

@@ -2,23 +2,54 @@ name: Python CI
on:
push:
branches:
- master
branches: [master]
pull_request:
branches:
- master
branches: [master]
concurrency:
group: ${{ format('ci-{0}', format('pr-{0}', github.event.pull_request.number) || github.sha) }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
build:
lint:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8]
env:
min-python-version: '3.10'
steps:
- name: Check out repository
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Set up Python ${{ env.min-python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ env.min-python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Lint with flake8
run: flake8
- name: Check black formatting
run: black . --check
if: success() || failure()
- name: Check isort formatting
run: isort . --check
if: success() || failure()
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10', '3.11']
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
@@ -30,15 +61,12 @@ jobs:
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Lint with flake8
continue-on-error: false
run: flake8 autogpt/ tests/ --select E303,W293,W291,W292,E305,E231,E302
- name: Run unittest tests with coverage
run: |
coverage run --source=autogpt -m unittest discover tests
pytest --cov=autogpt --without-integration --without-slow-integration
- name: Generate coverage report
run: |
coverage report
coverage xml
if: success() || failure()

28
.github/workflows/pr-label.yml vendored Normal file
View File

@@ -0,0 +1,28 @@
name: "Pull Request auto-label"
on:
# So that PRs touching the same files as the push are updated
push:
# So that the `dirtyLabel` is removed if conflicts are resolve
# We recommend `pull_request_target` so that github secrets are available.
# In `pull_request` we wouldn't be able to change labels of fork PRs
pull_request_target:
types: [opened, synchronize]
concurrency:
group: ${{ format('pr-label-{0}', github.event.pull_request.number || github.sha) }}
cancel-in-progress: true
jobs:
conflicts:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- name: Update PRs with conflict labels
uses: eps1lon/actions-label-merge-conflict@releases/2.x
with:
dirtyLabel: "conflicts"
#removeOnDirtyLabel: "PR: ready to ship"
repoToken: "${{ secrets.GITHUB_TOKEN }}"
commentOnDirty: "This pull request has conflicts with the base branch, please resolve those so we can evaluate the pull request."
commentOnClean: "Conflicts have been resolved! 🎉 A maintainer will review the pull request shortly."