Skip to content

AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.

Update reports when pushing to master (#162)

merwanehamadib904041ea178
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index aca2e3f5a8..a2224ea78d 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -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 "[email protected]"
+ 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