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.

feat(ci/benchmark): Generate step summary from benchmark report

Reinier van der Leere104427767e6
diff --git a/.github/workflows/autogpts-benchmark.yml b/.github/workflows/autogpts-benchmark.yml
index 9403f4385c..38f7803d93 100644
--- a/.github/workflows/autogpts-benchmark.yml
+++ b/.github/workflows/autogpts-benchmark.yml
@@ -71,6 +71,18 @@ jobs:
# BODGE: Remove success_rate.json and regression_tests.json to avoid conflicts on checkout
rm ${{ env.REPORTS_FOLDER }}/*.json
+ # Find folder with newest (untracked) report in it
+ report_subfolder=$(find ${{ env.REPORTS_FOLDER }} -type f -name 'report.json' \
+ | xargs -I {} dirname {} \
+ | xargs -I {} git ls-files --others --exclude-standard {} \
+ | xargs -I {} dirname {})
+ json_report_file="$report_subfolder/report.json"
+
+ # Convert JSON report to Markdown
+ markdown_report_file="$report_subfolder/report.md"
+ poetry run benchmark/reports/format.py "$json_report_file" > "$markdown_report_file"
+ cat "$markdown_report_file" >> $GITHUB_STEP_SUMMARY
+
git config --global user.name 'GitHub Actions'
git config --global user.email '[email protected]'
git fetch origin ${{ env.REPORTS_BRANCH }}:${{ env.REPORTS_BRANCH }} \