-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #698 from ATheorell/agentP
Adding official agent protocol test to ci + github badge
- Loading branch information
Showing
5 changed files
with
126 additions
and
32 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
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,47 @@ | ||
name: Validate agent protocol compliance | ||
on: | ||
pull_request: | ||
branches: [ main ] | ||
paths: | ||
- "**.py" | ||
- "**.yaml" | ||
- "**.yml" | ||
push: | ||
branches: [ main ] | ||
paths: | ||
- "**.py" | ||
- "**.yaml" | ||
- "**.yml" | ||
|
||
jobs: | ||
publish: | ||
name: Validate agent protocol compliance | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
|
||
- name: Install agent requirements | ||
run: pip install . | ||
|
||
- name: Check existence of OPENAI_API_KEY | ||
run: | | ||
if [[ -z "${OPENAI_API_KEY}" ]]; then | ||
echo "OPENAI_API_KEY is empty" | ||
else | ||
echo "OPENAI_API_KEY has a length of ${#OPENAI_API_KEY}" | ||
fi | ||
env: | ||
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | ||
|
||
- name: Run agent and validate compliance | ||
run: | | ||
python gpt_engineer/api.py & # Make sure to use the ampersand to detach your agent | ||
URL=http://127.0.0.1:8000 bash -c "$(curl -fsSL https://agentprotocol.ai/test.sh)" | ||
env: | ||
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} |
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