-
Notifications
You must be signed in to change notification settings - Fork 0
Create GHA to run the claude-code-harness #39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Creates a github action to run the [claude-code-harness](https://github.com/StacklokLabs/claude-code-harness) against the mcp-optimizer.
Code ReviewOverall: Well-structured GitHub Actions workflow with good security practices (pinned action versions with SHA hashes). A few suggestions for improvement: Issues & RecommendationsCritical
Improvements
Minor
Security✅ Good use of SHA-pinned actions Suggested additionsConsider adding |
|
|
||
| on: | ||
| workflow_call: | ||
| workflow_dispatch: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would be good to call this workflow from code-checks.yml
| - name: Checkout claude-code-harness code | ||
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | ||
| with: | ||
| repository: StacklokLabs/claude-code-harness | ||
| ref: wait-for-running_2025-10-30 | ||
| # PAT with read-only access to the claude-code-harness repo | ||
| token: ${{ secrets.GHA_CLAUDE_CODE_HARNESS_READ_PAT }} | ||
| path: claude-code-harness | ||
|
|
||
| # Run the test harness | ||
| - name: Run Claude Code Test Harness | ||
| run: | | ||
| cd claude-code-harness | ||
| export ANTHROPIC_API_KEY="${{ secrets.ANTHROPIC_API_KEY }}" | ||
| uv run python -m src ./configs/test/gha.json --setup ./configs/test/gha_server_setup.json --persist-servers | ||
| thv logs mcp-optimizer > ./mcp-optimizer-server.log || echo "Failed to get mcp-optimizer logs" | ||
| continue-on-error: true | ||
|
|
||
| # Upload the results as an artifact | ||
| - name: Upload Test Harness Run Logs | ||
| uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 | ||
| with: | ||
| name: claude-code-harness-logs | ||
| path: claude-code-harness/logs/*.jsonl | ||
| if-no-files-found: warn |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be good to call this as a github action instead of cloning the repo completely. Meaning to do something in this action like:
- name: Run Claude Code test harness
uses: StacklokLabs/[email protected]
with:
mcp_severs: ["time", "fetch"]
cases:
query: "In what timezone is Mexico?"
expected: "The timezone in Mexico is foo"
optimizer_config:
toolhive_host: "172.17.0.1"
Creates a github action to run the claude-code-harness against the mcp-optimizer.
Note: still determining how to run the action before merging.