Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up GitHub Workflows (#3059) #1

Merged
merged 38 commits into from
Apr 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
ffdc652
Clean up GitHub Workflows (#3059)
Pwuts Apr 24, 2023
17819e2
More robust null byte checking
collijk Apr 24, 2023
1f58ca4
Merge branch 'master' into bugfix/error-on-null-bytes-in-path-windows
collijk Apr 24, 2023
45f2513
Adjust test_json_parser file (#1935)
younessZMZ Apr 24, 2023
97d2f41
Merge branch 'master' into bugfix/error-on-null-bytes-in-path-windows
ntindle Apr 24, 2023
06e81b7
Merge pull request #3147 from collijk/bugfix/error-on-null-bytes-in-p…
collijk Apr 24, 2023
5f64649
Add indirection layer between cli and application start
collijk Apr 24, 2023
4a20616
Merge branch 'master' into refactor/add-indirection-layer-around-entr…
collijk Apr 24, 2023
5de1025
Agent and agent manager tests (#3116)
rihp Apr 24, 2023
128d83a
Merge branch 'master' into refactor/add-indirection-layer-around-entr…
ntindle Apr 24, 2023
8bf4eb7
Merge pull request #3152 from collijk/refactor/add-indirection-layer-…
collijk Apr 24, 2023
a5cc67b
anontation fix (#3018)
zhanglei1172 Apr 24, 2023
b984f98
Hotfix/global agent manager workaround (#3157)
collijk Apr 24, 2023
83b91a3
Remove dead permanent memory module (#3145)
collijk Apr 24, 2023
dfcbf6e
Refactor/move singleton out of config module (#3161)
collijk Apr 24, 2023
29284a5
Add option to install plugin dependencies (#3068)
dychen Apr 24, 2023
45f9b57
Re-add install-plugin-deps to CLI (#3170)
dychen Apr 25, 2023
c7f4734
Update ci.yml (#3179)
ntindle Apr 25, 2023
3d47b47
Update bulletin to warn about deprication (#3181)
johnseth97 Apr 25, 2023
140fd6f
Ensure Fore.RED is followed by Fore.RESET (#3182)
lwneal Apr 25, 2023
956d9fd
Add a little more descriptive installation instruction (#3180)
gluonhiggs Apr 25, 2023
960eb4f
Update installation.md (#3166)
MarKiSS2000 Apr 25, 2023
7e5afd8
Refactor/decouple logger from global configuration (#3171)
collijk Apr 25, 2023
eb0e967
docs fix to image generation (#3186)
ntindle Apr 25, 2023
411a13a
Update README.md
Torantulino Apr 25, 2023
ae31dd4
Feature: Added Self Feedback (#3013)
AbTrax Apr 25, 2023
93bbd13
Update README.md
Torantulino Apr 25, 2023
6fc6ea6
this changes it so the file from config is used, rather than a hardco…
ppetermann Apr 25, 2023
58d8478
Test `Agent.create_agent_feedback` (#3209)
waynehamadi Apr 25, 2023
940b115
remove plugin notice from CONTRIBUTING.md (#3227)
Pwuts Apr 25, 2023
2619740
Extract OpenAI API retry handler and unify ADA embeddings calls. (#3191)
collijk Apr 25, 2023
f962939
Use explicit API keys when querying openai rather than import time ma…
collijk Apr 25, 2023
1806fc6
Fix readme centering (#3243)
richbeales Apr 25, 2023
6fbac45
Remove import time loading of config from llm_utils (#3245)
collijk Apr 25, 2023
fac8f7d
adding probably erroneously removed return value from execut_shell, g…
psvensson Apr 25, 2023
eec86a7
Load .env in package init (#3251)
collijk Apr 25, 2023
8670b30
Fix PR size autolabeler message (#3194)
ntindle Apr 25, 2023
d753793
Fix `get_ada_embedding` return type (#3263)
Androbin Apr 25, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 0 additions & 23 deletions .github/workflows/auto_format.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
name: benchmark
name: Run Benchmarks

on:
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
environment: benchmark
strategy:
matrix:
python-version: ['3.10', '3.11']

env:
python-version: '3.10'

steps:
- name: Check out repository
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
- name: Set up Python ${{ env.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
python-version: ${{ env.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt

- name: benchmark
run: |
python benchmark/benchmark_entrepreneur_gpt_with_undecisive_user.py
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
run: |
python benchmark/benchmark_entrepreneur_gpt_with_undecisive_user.py
13 changes: 4 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ 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) }}
group: ${{ format('ci-{0}', github.head_ref && format('pr-{0}', github.event.pull_request.number) || github.sha) }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
Expand All @@ -17,7 +17,7 @@ jobs:
min-python-version: "3.10"

steps:
- name: Check out repository
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up Python ${{ env.min-python-version }}
Expand Down Expand Up @@ -74,11 +74,6 @@ jobs:
pytest --cov=autogpt --cov-report term-missing --cov-branch --cov-report xml --cov-report term
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
- name: Generate coverage report
run: |
coverage report
coverage xml
if: success() || failure()

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
58 changes: 58 additions & 0 deletions .github/workflows/docker-cache-clean.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Purge Docker CI cache

on:
schedule:
- cron: 20 4 * * 1,4

env:
BASE_BRANCH: master
IMAGE_NAME: auto-gpt

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
build-type: [release, dev]
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- id: build
name: Build image
uses: docker/build-push-action@v3
with:
build-args: BUILD_TYPE=${{ matrix.build-type }}
load: true # save to docker images
# use GHA cache as read-only
cache-to: type=gha,scope=docker-${{ matrix.build-type }},mode=max

- name: Generate build report
env:
event_name: ${{ github.event_name }}
event_ref: ${{ github.event.schedule }}

build_type: ${{ matrix.build-type }}

prod_branch: stable
dev_branch: master
repository: ${{ github.repository }}
base_branch: ${{ github.ref_name != 'master' && github.ref_name != 'stable' && 'master' || 'stable' }}

current_ref: ${{ github.ref_name }}
commit_hash: ${{ github.sha }}
source_url: ${{ format('{0}/tree/{1}', github.event.repository.url, github.sha) }}
push_forced_label:

new_commits_json: ${{ null }}
compare_url_template: ${{ format('/{0}/compare/{{base}}...{{head}}', github.repository) }}

github_context_json: ${{ toJSON(github) }}
job_env_json: ${{ toJSON(env) }}
vars_json: ${{ toJSON(vars) }}

run: .github/workflows/scripts/docker-ci-summary.sh >> $GITHUB_STEP_SUMMARY
continue-on-error: true
115 changes: 115 additions & 0 deletions .github/workflows/docker-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
name: Docker CI

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

concurrency:
group: ${{ format('docker-ci-{0}', github.head_ref && format('pr-{0}', github.event.pull_request.number) || github.sha) }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

env:
IMAGE_NAME: auto-gpt

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
build-type: [release, dev]
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- if: runner.debug
run: |
ls -al
du -hs *

- id: build
name: Build image
uses: docker/build-push-action@v3
with:
build-args: BUILD_TYPE=${{ matrix.build-type }}
tags: ${{ env.IMAGE_NAME }}
load: true # save to docker images
# cache layers in GitHub Actions cache to speed up builds
cache-from: type=gha,scope=docker-${{ matrix.build-type }}
cache-to: type=gha,scope=docker-${{ matrix.build-type }},mode=max

- name: Generate build report
env:
event_name: ${{ github.event_name }}
event_ref: ${{ github.event.ref }}
event_ref_type: ${{ github.event.ref}}

build_type: ${{ matrix.build-type }}

prod_branch: stable
dev_branch: master
repository: ${{ github.repository }}
base_branch: ${{ github.ref_name != 'master' && github.ref_name != 'stable' && 'master' || 'stable' }}

current_ref: ${{ github.ref_name }}
commit_hash: ${{ github.event.after }}
source_url: ${{ format('{0}/tree/{1}', github.event.repository.url, github.event.release && github.event.release.tag_name || github.sha) }}
push_forced_label: ${{ github.event.forced && '☢️ forced' || '' }}

new_commits_json: ${{ toJSON(github.event.commits) }}
compare_url_template: ${{ format('/{0}/compare/{{base}}...{{head}}', github.repository) }}

github_context_json: ${{ toJSON(github) }}
job_env_json: ${{ toJSON(env) }}
vars_json: ${{ toJSON(vars) }}

run: .github/workflows/scripts/docker-ci-summary.sh >> $GITHUB_STEP_SUMMARY
continue-on-error: true

# Docker setup needs fixing before this is going to work: #1843
test:
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- id: build
name: Build image
uses: docker/build-push-action@v3
with:
build-args: BUILD_TYPE=dev # include pytest
tags: ${{ env.IMAGE_NAME }}
load: true # save to docker images
# cache layers in GitHub Actions cache to speed up builds
cache-from: type=gha,scope=docker-dev
cache-to: type=gha,scope=docker-dev,mode=max

- id: test
name: Run tests
env:
CI: true
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
run: |
set +e
test_output=$(
docker run --env CI --env OPENAI_API_KEY --entrypoint python ${{ env.IMAGE_NAME }} -m \
pytest --cov=autogpt --cov-report term-missing --cov-branch --cov-report xml --cov-report term 2>&1
)
test_failure=$?

echo "$test_output"

cat << $EOF >> $GITHUB_STEP_SUMMARY
# Tests $([ $test_failure = 0 ] && echo '✅' || echo '❌')
\`\`\`
$test_output
\`\`\`
$EOF
21 changes: 0 additions & 21 deletions .github/workflows/docker-image.yml

This file was deleted.

81 changes: 81 additions & 0 deletions .github/workflows/docker-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: Docker Release

on:
release:
types: [ published, edited ]

workflow_dispatch:
inputs:
no_cache:
type: boolean
description: 'Build from scratch, without using cached layers'

env:
IMAGE_NAME: auto-gpt
DEPLOY_IMAGE_NAME: ${{ secrets.DOCKER_USER }}/auto-gpt

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Log in to Docker hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

# slashes are not allowed in image tags, but can appear in git branch or tag names
- id: sanitize_tag
name: Sanitize image tag
run: echo tag=${raw_tag//\//-} >> $GITHUB_OUTPUT
env:
raw_tag: ${{ github.ref_name }}

- id: build
name: Build image
uses: docker/build-push-action@v3
with:
build-args: BUILD_TYPE=release
load: true # save to docker images
# push: true # TODO: uncomment when this issue is fixed: https://github.com/moby/buildkit/issues/1555
tags: >
${{ env.IMAGE_NAME }},
${{ env.DEPLOY_IMAGE_NAME }}:latest,
${{ env.DEPLOY_IMAGE_NAME }}:${{ steps.sanitize_tag.outputs.tag }}

# cache layers in GitHub Actions cache to speed up builds
cache-from: ${{ !inputs.no_cache && 'type=gha' || '' }},scope=docker-release
cache-to: type=gha,scope=docker-release,mode=max

- name: Push image to Docker Hub
run: docker push --all-tags ${{ env.DEPLOY_IMAGE_NAME }}

- name: Generate build report
env:
event_name: ${{ github.event_name }}
event_ref: ${{ github.event.ref }}
event_ref_type: ${{ github.event.ref}}
inputs_no_cache: ${{ inputs.no_cache }}

prod_branch: stable
dev_branch: master
repository: ${{ github.repository }}
base_branch: ${{ github.ref_name != 'master' && github.ref_name != 'stable' && 'master' || 'stable' }}

ref_type: ${{ github.ref_type }}
current_ref: ${{ github.ref_name }}
commit_hash: ${{ github.sha }}
source_url: ${{ format('{0}/tree/{1}', github.event.repository.url, github.event.release && github.event.release.tag_name || github.sha) }}

github_context_json: ${{ toJSON(github) }}
job_env_json: ${{ toJSON(env) }}
vars_json: ${{ toJSON(vars) }}

run: .github/workflows/scripts/docker-release-summary.sh >> $GITHUB_STEP_SUMMARY
continue-on-error: true
Loading