Skip to content

Improve Claude Code Reviewer to handle large files #226

Improve Claude Code Reviewer to handle large files

Improve Claude Code Reviewer to handle large files #226

Workflow file for this run

# Copyright(C) 2025-2026 Advanced Micro Devices, Inc. All rights reserved.
# SPDX-License-Identifier: MIT
# Main GAIA CLI testing workflow that coordinates platform-specific tests
# This workflow calls both Windows (full integration) and Linux (Lemonade-independent) tests
# Platform Coverage: Windows (full) + Linux (partial) + cross-platform validation
name: GAIA CLI Tests (All Platforms)
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:
# Run linting first (fast feedback)
lint:
name: Code Quality (Linting)
uses: ./.github/workflows/lint.yml
# Run unit tests second (fast, no external dependencies)
unit-tests:
name: Unit Tests (Fast)
needs: lint
uses: ./.github/workflows/test_unit.yml
if: github.event_name != 'pull_request' || github.event.pull_request.draft == false || contains(github.event.pull_request.labels.*.name, 'ready_for_ci')
# Test Windows CLI with full Lemonade integration
test-windows:
name: Windows CLI Tests (Full Integration)
needs: lint
uses: ./.github/workflows/test_gaia_cli_windows.yml
if: github.event_name != 'pull_request' || github.event.pull_request.draft == false || contains(github.event.pull_request.labels.*.name, 'ready_for_ci')
# Test Linux CLI with full Lemonade integration
test-linux:
name: Linux CLI Tests (Full Integration)
needs: lint
uses: ./.github/workflows/test_gaia_cli_linux.yml
if: github.event_name != 'pull_request' || github.event.pull_request.draft == false || contains(github.event.pull_request.labels.*.name, 'ready_for_ci')
# Test MCP Bridge functionality
test-mcp:
name: MCP Bridge Tests
needs: lint
uses: ./.github/workflows/test_mcp.yml
if: github.event_name != 'pull_request' || github.event.pull_request.draft == false || contains(github.event.pull_request.labels.*.name, 'ready_for_ci')
# Test Code Agent functionality
test-code-agent:
name: Code Agent Tests
needs: lint
uses: ./.github/workflows/test_code_agent.yml
if: github.event_name != 'pull_request' || github.event.pull_request.draft == false || contains(github.event.pull_request.labels.*.name, 'ready_for_ci')
# Test Chat Agent functionality
test-chat-agent:
name: Chat Agent Tests
needs: lint
uses: ./.github/workflows/test_chat_agent.yml
if: github.event_name != 'pull_request' || github.event.pull_request.draft == false || contains(github.event.pull_request.labels.*.name, 'ready_for_ci')
# Test Security features
test-security:
name: Security Tests
needs: lint
uses: ./.github/workflows/test_security.yml
if: github.event_name != 'pull_request' || github.event.pull_request.draft == false || contains(github.event.pull_request.labels.*.name, 'ready_for_ci')
# Summary job that reports overall status
test-summary:
name: Test Summary
runs-on: ubuntu-latest
needs: [lint, unit-tests, test-windows, test-linux, test-mcp, test-code-agent, test-chat-agent, test-security]
if: always()
steps:
- name: Check test results
run: |
echo "=== GAIA CLI Test Summary ==="
echo "Lint Status: ${{ needs.lint.result }}"
echo "Unit Tests Status: ${{ needs.unit-tests.result }}"
echo "Windows Tests Status: ${{ needs.test-windows.result }}"
echo "Linux Tests Status: ${{ needs.test-linux.result }}"
echo "MCP Tests Status: ${{ needs.test-mcp.result }}"
echo "Code Agent Tests Status: ${{ needs.test-code-agent.result }}"
echo "Chat Agent Tests Status: ${{ needs.test-chat-agent.result }}"
echo "Security Tests Status: ${{ needs.test-security.result }}"
echo ""
# Check if all tests were skipped (draft PR without ready_for_ci label)
if [[ "${{ needs.lint.result }}" == "skipped" &&
"${{ needs.unit-tests.result }}" == "skipped" &&
"${{ needs.test-windows.result }}" == "skipped" &&
"${{ needs.test-linux.result }}" == "skipped" &&
"${{ needs.test-mcp.result }}" == "skipped" &&
"${{ needs.test-code-agent.result }}" == "skipped" &&
"${{ needs.test-chat-agent.result }}" == "skipped" &&
"${{ needs.test-security.result }}" == "skipped" ]]; then
echo "⏭️ All tests skipped (draft PR - add 'ready_for_ci' label to run)"
exit 0
fi
# Helper function to check if result is acceptable (success or skipped)
check_result() {
[[ "$1" == "success" || "$1" == "skipped" ]]
}
# Determine overall status (success or skipped are both acceptable)
if check_result "${{ needs.lint.result }}" &&
check_result "${{ needs.unit-tests.result }}" &&
check_result "${{ needs.test-windows.result }}" &&
check_result "${{ needs.test-linux.result }}" &&
check_result "${{ needs.test-mcp.result }}" &&
check_result "${{ needs.test-code-agent.result }}" &&
check_result "${{ needs.test-chat-agent.result }}" &&
check_result "${{ needs.test-security.result }}"; then
echo "✅ All tests passed!"
echo "- Unit Tests: Fast SDK component tests (DatabaseMixin, LLM, ASR, TTS)"
echo "- Windows: Full CLI functionality with Lemonade integration"
echo "- Linux: Full CLI functionality with Lemonade integration"
echo "- MCP: HTTP-native bridge and protocol compliance"
echo "- Code Agent: Autonomous code generation and modification"
echo "- Chat Agent: Session persistence and chat history"
echo "- Security: Path validation and shell injection prevention"
echo "- Cross-platform: Code quality and compatibility"
else
echo "❌ Some tests failed:"
[[ "${{ needs.lint.result }}" == "failure" ]] && echo " - Linting failed"
[[ "${{ needs.unit-tests.result }}" == "failure" ]] && echo " - Unit tests failed"
[[ "${{ needs.test-windows.result }}" == "failure" ]] && echo " - Windows tests failed"
[[ "${{ needs.test-linux.result }}" == "failure" ]] && echo " - Linux tests failed"
[[ "${{ needs.test-mcp.result }}" == "failure" ]] && echo " - MCP tests failed"
[[ "${{ needs.test-code-agent.result }}" == "failure" ]] && echo " - Code Agent tests failed"
[[ "${{ needs.test-chat-agent.result }}" == "failure" ]] && echo " - Chat Agent tests failed"
[[ "${{ needs.test-security.result }}" == "failure" ]] && echo " - Security tests failed"
exit 1
fi
- name: Report test coverage
run: |
echo ""
echo "=== Test Coverage by Platform ==="
echo "⚡ Unit Tests (Fast, No Dependencies):"
echo " ✅ DatabaseMixin: SQLite database access for agents"
echo " ✅ LLM Client: Language model client utilities"
echo " ✅ ASR: Automatic speech recognition utilities"
echo " ✅ TTS: Text-to-speech utilities"
echo ""
echo "🪟 Windows (Full Integration):"
echo " ✅ CLI installation and setup"
echo " ✅ Lemonade server integration"
echo " ✅ Core commands (chat, prompt, llm)"
echo " ✅ Audio features (talk command)"
echo " ✅ Evaluation tools"
echo " ✅ Summarizer CLI integration"
echo " ✅ Process management"
echo ""
echo "🐧 Linux (Full Integration):"
echo " ✅ CLI installation and setup"
echo " ✅ Lemonade server with Gemma model"
echo " ✅ Core commands (chat, prompt, llm)"
echo " ✅ Evaluation tools (eval, groundtruth, report)"
echo " ✅ Summarizer CLI integration"
echo " ✅ Cross-platform process management"
echo " ✅ Python import compatibility"
echo ""
echo "🌐 MCP Bridge (Cross-Platform):"
echo " ✅ HTTP-native bridge server"
echo " ✅ JSON-RPC protocol compliance"
echo " ✅ LLM agent integration"
echo " ✅ Tool registration and discovery"
echo " ✅ Error handling and recovery"
echo " ✅ CORS support for browser clients"
echo " ⏭️ Jira integration (skipped - requires auth)"
echo ""
echo "🔒 Security Tests (Cross-Platform):"
echo " ✅ Path traversal prevention (PathValidator)"
echo " ✅ Shell command injection prevention"
echo " ✅ Agent security boundary enforcement"
echo " ✅ Argument sanitization"
echo " ✅ Access control validation"
echo " ✅ Windows and Linux security verification"
echo ""
echo "🎉 Full Platform Support Achieved!"
echo " 🔧 Future enhancements:"
echo " 🚧 Audio/TTS functionality testing"
echo " 🚧 NPU driver support (if available)"
echo " 🚧 Performance optimization"