mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2026-01-07 08:14:25 +01:00
Feature: Visualize Test Results (#211)
This commit is contained in:
90
.github/workflows/ci.yml
vendored
90
.github/workflows/ci.yml
vendored
@@ -4,11 +4,11 @@ on:
|
||||
workflow_dispatch:
|
||||
branches: [master]
|
||||
schedule:
|
||||
- cron: "0 8 * * *"
|
||||
- cron: '0 8 * * *'
|
||||
push:
|
||||
branches: [master, ci-test*]
|
||||
paths-ignore:
|
||||
- "reports/**"
|
||||
- 'reports/**'
|
||||
pull_request:
|
||||
branches: [stable, master, release-*]
|
||||
|
||||
@@ -16,7 +16,7 @@ jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
min-python-version: "3.10"
|
||||
min-python-version: '3.10'
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
@@ -69,20 +69,20 @@ jobs:
|
||||
tests:
|
||||
env:
|
||||
GH_TOKEN: ${{ github.event_name == 'pull_request' && github.token || secrets.PAT }}
|
||||
min-python-version: "3.10"
|
||||
name: "${{ matrix.agent-name }}"
|
||||
min-python-version: '3.10'
|
||||
name: '${{ matrix.agent-name }}'
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
agent-name:
|
||||
- "gpt-engineer"
|
||||
- "smol-developer"
|
||||
- "Auto-GPT"
|
||||
- "mini-agi"
|
||||
- "beebot"
|
||||
- "BabyAGI"
|
||||
- 'gpt-engineer'
|
||||
- 'smol-developer'
|
||||
- 'Auto-GPT'
|
||||
- 'mini-agi'
|
||||
- 'beebot'
|
||||
- 'BabyAGI'
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
@@ -243,8 +243,74 @@ jobs:
|
||||
attempts=$(($attempts + 1))
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
echo "Failed after $max_attempts attempts."
|
||||
env:
|
||||
GDRIVE_BASE64: ${{ secrets.GDRIVE_BASE64 }}
|
||||
GITHUB_REF_NAME: ${{ github.ref_name }}
|
||||
|
||||
generate_charts:
|
||||
needs: tests
|
||||
env:
|
||||
GH_TOKEN: ${{ github.event_name == 'pull_request' && github.token || secrets.PAT }}
|
||||
min-python-version: '3.10'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: '3.10'
|
||||
|
||||
- id: get_date
|
||||
name: Get date
|
||||
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Install Poetry
|
||||
run: |
|
||||
curl -sSL https://install.python-poetry.org | python -
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
poetry install -vvv
|
||||
poetry build
|
||||
pip install dist/*.whl
|
||||
|
||||
- name: Generate charts
|
||||
run: |
|
||||
python agbenchmark/reports/processing/gen_combined_chart.py
|
||||
env:
|
||||
REPORT_LOCATION: 'reports'
|
||||
|
||||
- name: Authenticate and Push to Branch
|
||||
if: (success() || failure()) && (github.event_name != 'pull_request')
|
||||
run: |
|
||||
git config --global user.email "github-bot@agpt.co"
|
||||
git config --global user.name "Auto-GPT-Bot"
|
||||
|
||||
git add reports/*.png || echo "nothing to commit"
|
||||
commit_message="Update radar charts - $(date +'%Y%m%d%H%M%S')"
|
||||
git commit -m "${commit_message}"
|
||||
git stash
|
||||
current_branch=${{ github.ref_name }}
|
||||
attempts=0
|
||||
max_attempts=3
|
||||
|
||||
while [ $attempts -lt $max_attempts ]; do
|
||||
git fetch origin $current_branch
|
||||
git rebase origin/$current_branch
|
||||
if git push origin HEAD; then
|
||||
echo "Success!"
|
||||
exit 0
|
||||
else
|
||||
echo "Attempt $(($attempts + 1)) failed. Retrying..."
|
||||
attempts=$(($attempts + 1))
|
||||
fi
|
||||
done
|
||||
|
||||
echo "Failed after $max_attempts attempts."
|
||||
env:
|
||||
GITHUB_REF_NAME: ${{ github.ref_name }}
|
||||
REPORT_LOCATION: 'reports'
|
||||
|
||||
Reference in New Issue
Block a user