Skip to content

Commit 25a8abd

Browse files
christsoclaude
andcommitted
feat(ci): add GitHub Actions workflow to run evals
Adds a workflow_dispatch workflow that runs AgentV evals in CI using GitHub Copilot CLI and GitHub Models. Runs from source (bun apps/cli/dist/cli.js) instead of installing agentv from npm. Closes #892 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent ecb971c commit 25a8abd

1 file changed

Lines changed: 85 additions & 0 deletions

File tree

.github/workflows/evals.yml

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
name: Run Evals
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
suite_filter:
7+
description: "Glob pattern for eval files to run"
8+
required: false
9+
default: "evals/**/eval.yaml"
10+
threshold:
11+
description: "Minimum score threshold (0-1)"
12+
required: false
13+
default: "0.8"
14+
15+
jobs:
16+
evals:
17+
name: Run AgentV Evals
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v4
21+
- uses: ./.github/actions/setup-bun
22+
23+
- name: Build
24+
run: bun run build
25+
26+
- name: Install GitHub Copilot CLI
27+
run: curl -fsSL https://gh.io/copilot-install | bash
28+
29+
- name: Configure credentials
30+
run: |
31+
{
32+
echo "GITHUB_MODELS_TOKEN=${{ secrets.GITHUB_MODELS_TOKEN || secrets.GITHUB_TOKEN }}"
33+
echo "GITHUB_MODELS_MODEL=${{ vars.GITHUB_MODELS_MODEL || 'openai/gpt-5-mini' }}"
34+
echo "GITHUB_MODELS_GRADER_MODEL=${{ vars.GITHUB_MODELS_GRADER_MODEL || 'openai/gpt-5-mini' }}"
35+
} > .env
36+
37+
- name: Resolve filter and threshold
38+
id: filter
39+
run: |
40+
echo "pattern=${{ github.event.inputs.suite_filter || 'evals/**/eval.yaml' }}" >> "$GITHUB_OUTPUT"
41+
echo "threshold=${{ github.event.inputs.threshold || '0.8' }}" >> "$GITHUB_OUTPUT"
42+
43+
- name: Run AgentV evals
44+
id: run-evals
45+
env:
46+
COPILOT_GITHUB_TOKEN: ${{ secrets.COPILOT_PAT }}
47+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
48+
run: |
49+
mkdir -p .agentv/ci-results
50+
51+
bun apps/cli/dist/cli.js eval run "${{ steps.filter.outputs.pattern }}" \
52+
--workers 1 \
53+
--threshold ${{ steps.filter.outputs.threshold }} \
54+
-o .agentv/ci-results/junit.xml \
55+
--benchmark-json .agentv/ci-results/benchmark.json \
56+
--artifacts .agentv/ci-results/artifacts \
57+
--verbose \
58+
2>&1 | tee .agentv/ci-results/eval-output.log
59+
60+
echo "exit_code=${PIPESTATUS[0]}" >> "$GITHUB_OUTPUT"
61+
62+
- name: Publish JUnit test results
63+
if: always()
64+
uses: dorny/test-reporter@v1
65+
with:
66+
name: AgentV Eval Results
67+
path: .agentv/ci-results/junit.xml
68+
reporter: java-junit
69+
fail-on-error: false
70+
71+
- name: Upload eval artifacts
72+
if: always()
73+
uses: actions/upload-artifact@v4
74+
with:
75+
name: eval-results-${{ github.run_id }}
76+
path: .agentv/ci-results/
77+
retention-days: 30
78+
79+
- name: Fail if threshold not met
80+
if: always()
81+
run: |
82+
if [ "${{ steps.run-evals.outputs.exit_code }}" != "0" ]; then
83+
echo "::error::Eval score below threshold (${{ steps.filter.outputs.threshold }})"
84+
exit 1
85+
fi

0 commit comments

Comments
 (0)