Skip to content

Improve Claude Code Reviewer to handle large files #140

Improve Claude Code Reviewer to handle large files

Improve Claude Code Reviewer to handle large files #140

Workflow file for this run

# Copyright(C) 2025-2026 Advanced Micro Devices, Inc. All rights reserved.
# SPDX-License-Identifier: MIT
# This workflow runs tests for the evaluation tool
# Triggers when eval source code or tests are modified
# Platform: Windows only
name: Test Evaluation Tool
on:
workflow_call:
push:
branches: ["main"]
pull_request:
branches: ["main"]
types: [opened, synchronize, reopened, ready_for_review]
merge_group:
workflow_dispatch:
permissions:
contents: read
jobs:
test-eval-windows:
name: Test Eval Tool (Windows)
runs-on: windows-latest
if: github.event_name != 'pull_request' || github.event.pull_request.draft == false || contains(github.event.pull_request.labels.*.name, 'ready_for_ci')
timeout-minutes: 10 # 2 minute target but allow some buffer
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Set up Python 3.12
uses: actions/setup-python@v6
with:
python-version: '3.12'
- name: Install uv
run: |
irm https://astral.sh/uv/install.ps1 | iex
echo "$env:USERPROFILE\.local\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
shell: pwsh
- name: Install dependencies
run: |
uv pip install --system -e .
uv pip install --system pytest pytest-cov pytest-mock anthropic rich
- name: Run eval unit tests
run: |
pytest tests/test_eval.py -v --cov=src/gaia/eval --cov-report=term-missing
- name: Test eval CLI commands
run: |
# Test help command
python -m gaia.cli eval --help
# Test visualize help
python -m gaia.cli visualize --help
- name: Set up Node.js
uses: actions/setup-node@v6
with:
node-version: '18'
- name: Test webapp functionality
run: |
cd src/gaia/eval/webapp
# Install dependencies
npm install
# Run syntax checks
npm test
# Test that server can start (Windows-compatible version)
$env:PORT = 3456 # Use non-default port to avoid conflicts
$process = Start-Process node -ArgumentList "server.js" -PassThru -ErrorAction Stop
Start-Sleep -Seconds 3
if ($process.HasExited) {
Write-Error "Server failed to start or crashed immediately"
exit 1
}
# Try to connect to the server
try {
$response = Invoke-WebRequest -Uri "http://localhost:3456" -TimeoutSec 5 -UseBasicParsing
Write-Output "Server responded with status: $($response.StatusCode)"
} catch {
Write-Error "Server did not respond to HTTP request"
Stop-Process -Id $process.Id -Force -ErrorAction SilentlyContinue
exit 1
}
Stop-Process -Id $process.Id -Force
Write-Output "Webapp server test passed"