Feat: Add workflow for single model benchmarks

This commit is contained in:
2025-11-14 16:01:08 -08:00
parent ab4f7671c0
commit da087e9ca0

39
.github/workflows/run-single-model.yml vendored Normal file
View File

@@ -0,0 +1,39 @@
name: Run Single Model Benchmark
on:
workflow_dispatch:
inputs:
model_name:
description: 'Model to benchmark (must exist in README)'
required: true
type: string
jobs:
benchmark:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install dependencies
run: npm install
- name: Run benchmark for single model
run: npm start -- --model "${{ inputs.model_name }}"
env:
OPENROUTER_KEY: ${{ secrets.OPENROUTER_KEY }}
- name: Commit and push if changed
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add README tests results.json
git diff --staged --quiet || (git commit -m "Docs: Update benchmark for ${{ inputs.model_name }}" && git push)