Add action to generate and upload MCP-Eval badges from JSON report - #34
Conversation
saqadri
left a comment
There was a problem hiding this comment.
Nice! How do we get the badge after running the action? Is there a way to have some link in a README that points to the badge, which would automatically be updated by the GitHub action?
7c7a939 to
7db85ff
Compare
|
@saqadri In our workflow we can do something like: ...
- name: Generate badges
uses: ./.github/actions/mcp-eval/badges
with:
report-path: ${{ steps.mcpeval.outputs.results-json-path }}
output-dir: badges
upload-artifacts: 'false'
# Update README badges to point to the correct paths
- name: Update README badges
run: |
# Ensure badges exist in README
if ! grep -q "!\[mcp-tests\]" README.md; then
# Add badges at the top of README if they don't exist
sed -i '1a\\n\n\n' README.md
fi
# Commit badge files
- name: Commit changes
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add badges/*.svg README.md || true
# Only commit if there are changes
if ! git diff --cached --quiet; then
git commit -m "chore(mcpeval): update badges"
git push
fi
|
@StreetLamb messaged async as well but in interest of building in the open -- we should follow the standard practice for badge generation to make them dynamic: That would make it much simpler to have developers use them. |
…s to github pages
b714875 to
0b15ad5
Compare
saqadri
left a comment
There was a problem hiding this comment.
Looks great! Can you share what this would look like used by someone? i.e. what URL they should set in their badge to have it show up in a readme or some other place?
…o comment PR with report. Update mcp-eval to use reusable workflow.
|
@saqadri Updated the ci/cd page to include info on how to create the workflow and use the badges. The |
|
@StreetLamb awesome! Let's merge it and give it a spin |
|
@saqadri Workflow working as expected! |
|
Awesome work @StreetLamb ! |
Summary
Checklist
Screenshots / Logs
If applicable, add screenshots or logs.
Breaking Changes
If yes, describe the migration path.