forked from Significant-Gravitas/AutoGPT
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature/basic proxy (Significant-Gravitas#4164)
* basic proxy (Significant-Gravitas#54) * basic proxy (Significant-Gravitas#55) * basic proxy * basic proxy * basic proxy * basic proxy * add back double quotes * add more specific files * write file * basic proxy * Put back double quotes
- Loading branch information
1 parent
e6f8e51
commit 4143d21
Showing
22 changed files
with
300 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: Merge and Commit Cassettes | ||
|
||
on: | ||
pull_request_target: | ||
types: | ||
- closed | ||
|
||
jobs: | ||
update-cassettes: | ||
if: github.event.pull_request.merged == true | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 # This is necessary to fetch all branches and tags | ||
|
||
- name: Fetch all branches | ||
run: git fetch --all | ||
|
||
- name: Reset branch | ||
run: | | ||
git checkout ${{ github.event.pull_request.base.ref }} | ||
git reset --hard origin/cassette-diff-${{ github.event.pull_request.number }} | ||
- name: Create PR | ||
id: create_pr | ||
uses: peter-evans/create-pull-request@v5 | ||
with: | ||
commit-message: Update cassettes | ||
signoff: false | ||
branch: cassette-diff-${{ github.event.pull_request.number }} | ||
delete-branch: false | ||
title: "Update cassettes" | ||
body: "This PR updates the cassettes." | ||
draft: false | ||
|
||
- name: Check PR | ||
run: | | ||
echo "Pull Request Number - ${{ steps.create_pr.outputs.pull-request-number }}" | ||
echo "Pull Request URL - ${{ steps.create_pr.outputs.pull-request-url }}" | ||
- name: Comment PR URL in the current PR | ||
uses: thollander/actions-comment-pull-request@v2 | ||
with: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
message: | | ||
New pull request created for cassettes: [HERE](${{ steps.create_pr.outputs.pull-request-url }}). Please merge it asap. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,12 +3,12 @@ name: Python CI | |
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
pull_request_target: | ||
branches: [ master, stable ] | ||
|
||
concurrency: | ||
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' }} | ||
cancel-in-progress: ${{ github.event_name == 'pull_request_target' }} | ||
|
||
jobs: | ||
lint: | ||
|
@@ -19,6 +19,9 @@ jobs: | |
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
ref: ${{ github.event.pull_request.head.ref }} | ||
|
||
- name: Set up Python ${{ env.min-python-version }} | ||
uses: actions/setup-python@v2 | ||
|
@@ -58,6 +61,9 @@ jobs: | |
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
ref: ${{ github.event.pull_request.head.ref }} | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
|
@@ -74,6 +80,20 @@ jobs: | |
pytest -n auto --cov=autogpt --cov-report term-missing --cov-branch --cov-report xml --cov-report term | ||
env: | ||
CI: true | ||
PROXY: ${{ vars.PROXY }} | ||
AGENT_MODE: ${{ vars.AGENT_MODE }} | ||
AGENT_TYPE: ${{ vars.AGENT_TYPE }} | ||
|
||
- name: Upload coverage reports to Codecov | ||
uses: codecov/codecov-action@v3 | ||
|
||
- name: Stage new files and commit | ||
run: | | ||
git add tests | ||
git diff --cached --quiet && echo "No changes to commit" && exit 0 | ||
git config user.email "[email protected]" | ||
git config user.name "GitHub Actions" | ||
git commit -m "Add new cassettes" | ||
git checkout -b cassette-diff-${{ github.event.pull_request.number }} | ||
git push -f origin cassette-diff-${{ github.event.pull_request.number }} | ||
echo "COMMIT_SHA=$(git rev-parse HEAD)" >> $GITHUB_ENV |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.