mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2025-12-28 11:24:30 +01:00
Update reports when pushing to master (#162)
Signed-off-by: Merwane Hamadi <merwanehamadi@gmail.com>
This commit is contained in:
28
.github/workflows/ci.yml
vendored
28
.github/workflows/ci.yml
vendored
@@ -7,6 +7,8 @@ on:
|
||||
- cron: "0 8 * * *"
|
||||
push:
|
||||
branches: [master, ci-test*]
|
||||
paths-ignore:
|
||||
- 'benchmark_runs/**'
|
||||
pull_request:
|
||||
branches: [stable, master, release-*]
|
||||
|
||||
@@ -64,11 +66,12 @@ jobs:
|
||||
if: success() || failure()
|
||||
|
||||
tests:
|
||||
env:
|
||||
GH_TOKEN: ${{ github.event_name == 'pull_request' && github.token || secrets.PAT }}
|
||||
min-python-version: "3.10"
|
||||
name: "${{ matrix.agent-name }} (Cache: ${{ matrix.cache-enabled }})"
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
env:
|
||||
min-python-version: "3.10"
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
@@ -87,6 +90,7 @@ jobs:
|
||||
ref: ${{ github.event.pull_request.head.ref }}
|
||||
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
||||
submodules: true
|
||||
token: ${{ env.GH_TOKEN }}
|
||||
|
||||
- name: Set up Python ${{ env.min-python-version }}
|
||||
uses: actions/setup-python@v2
|
||||
@@ -151,6 +155,9 @@ jobs:
|
||||
curl -s https://raw.githubusercontent.com/Helicone/helicone/main/mitmproxy.sh | bash -s start
|
||||
agbenchmark start || echo "This command will always return a non zero exit code unless all the challenges are solved."
|
||||
fi
|
||||
|
||||
cd ../..
|
||||
|
||||
env:
|
||||
GITHUB_EVENT_NAME: ${{ github.event_name }}
|
||||
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
|
||||
@@ -160,7 +167,7 @@ jobs:
|
||||
REQUESTS_CA_BUNDLE: /etc/ssl/certs/ca-certificates.crt
|
||||
HELICONE_CACHE_ENABLED: ${{ matrix.cache-enabled }}
|
||||
HELICONE_PROPERTY_AGENT: ${{ matrix.agent-name }}
|
||||
REPORT_LOCATION: ${{ matrix.cache-enabled == true && format('../../../benchmark_runs/{0}', matrix.agent-name) || '.' }}
|
||||
REPORT_LOCATION: ${{ matrix.cache-enabled == false && format('../../../benchmark_runs/{0}', matrix.agent-name) || '.' }}
|
||||
|
||||
|
||||
- name: Upload reports
|
||||
@@ -169,3 +176,18 @@ jobs:
|
||||
with:
|
||||
name: ${{ matrix.agent-name }}
|
||||
path: benchmark_runs/${{ matrix.agent-name }}
|
||||
|
||||
- name: Authenticate and Push to Branch
|
||||
if: (success() || failure()) && (github.event_name != 'pull_request' && matrix.cache-enabled == false)
|
||||
run: |
|
||||
git config --global user.email "github-bot@agpt.co"
|
||||
git config --global user.name "Auto-GPT-Bot"
|
||||
|
||||
git add benchmark_runs/* || echo "nothing to commit"
|
||||
commit_message="${{ matrix.agent-name }}-$(date +'%Y%m%d%H%M%S')"
|
||||
git commit -m "${commit_message}"
|
||||
|
||||
current_branch=${{ github.ref_name }}
|
||||
git fetch origin $current_branch
|
||||
git rebase origin/$current_branch
|
||||
git push origin HEAD
|
||||
|
||||
Reference in New Issue
Block a user