fix(tests): final commit #1
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Integration testing | ||
| on: | ||
| push: | ||
| branches: [ main, develop ] | ||
| pull_request: | ||
| branches: [ main ] | ||
| jobs: | ||
| integration-tests: | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read | ||
| pull-requests: write | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
| - name: Set up Docker Buildx | ||
| uses: docker/setup-buildx-action@v3 | ||
| - name: Build common Docker image | ||
| run: | | ||
| Write-Host "Building common Docker image at $(Get-Date)" | ||
| docker build -f testcases/Dockerfile ` | ||
| -t uipath-langchain-testbase:latest ` | ||
| . | ||
| Write-Host "Common Docker image built at $(Get-Date)" | ||
| shell: pwsh | ||
| - name: Run testcases | ||
| run: | | ||
| $jobs = @( | ||
| "company-research-agent:true:alpha", | ||
| "company-research-agent:false:alpha", | ||
| "simple-local-mcp:true:alpha", | ||
| "simple-local-mcp:false:alpha", | ||
| "ticket-classification:true:alpha", | ||
| "ticket-classification:false:alpha", | ||
| "multi-agent-supervisor-researcher-coder:true:alpha", | ||
| "multi-agent-supervisor-researcher-coder:false:alpha", | ||
| "company-research-agent:true:cloud", | ||
| "company-research-agent:false:cloud", | ||
| "simple-local-mcp:true:cloud", | ||
| "simple-local-mcp:false:cloud", | ||
| "ticket-classification:true:cloud", | ||
| "ticket-classification:false:cloud", | ||
| "multi-agent-supervisor-researcher-coder:true:cloud", | ||
| "multi-agent-supervisor-researcher-coder:false:cloud" | ||
| ) | ||
| Write-Host "=== STARTING TESTCASE EXECUTION ===" | ||
| Write-Host "Total testcases to run: $($jobs.Count)" | ||
| Write-Host "Alpha environment with UiPathAzureChatOpenAI: $(($jobs | Where-Object { $_ -like '*:true:alpha' }).Count)" | ||
| Write-Host "Alpha environment with UiPathChat: $(($jobs | Where-Object { $_ -like '*:false:alpha' }).Count)" | ||
| Write-Host "Cloud environment with UiPathAzureChatOpenAI: $(($jobs | Where-Object { $_ -like '*:true:cloud' }).Count)" | ||
| Write-Host "Cloud environment with UiPathChat: $(($jobs | Where-Object { $_ -like '*:false:cloud' }).Count)" | ||
| Write-Host "=======================================" | ||
| $backgroundJobs = @() | ||
| foreach ($job in $jobs) { | ||
| $parts = $job -split ":" | ||
| $testcase = $parts[0] | ||
| $use_azure_chat = $parts[1] | ||
| $environment = $parts[2] | ||
| $llm = if ($use_azure_chat -eq "true") { "UiPathAzureChatOpenAI" } else { "UiPathChat" } | ||
| $log_file = "run_${testcase}_${llm}_${environment}.log" | ||
| # Set environment-specific credentials | ||
| if ($environment -eq "alpha") { | ||
| $CLIENT_ID_VAR = '${{ secrets.ALPHA_TEST_CLIENT_ID }}' | ||
| $CLIENT_SECRET_VAR = '${{ secrets.ALPHA_TEST_CLIENT_SECRET }}' | ||
| $BASE_URL_VAR = '${{ secrets.ALPHA_BASE_URL }}' | ||
| } else { | ||
| $CLIENT_ID_VAR = '${{ secrets.CLOUD_TEST_CLIENT_ID }}' | ||
| $CLIENT_SECRET_VAR = '${{ secrets.CLOUD_TEST_CLIENT_SECRET }}' | ||
| $BASE_URL_VAR = '${{ secrets.CLOUD_BASE_URL }}' | ||
| } | ||
| $scriptBlock = { | ||
| param($testcase, $llm, $environment, $log_file, $use_azure_chat, $CLIENT_ID_VAR, $CLIENT_SECRET_VAR, $BASE_URL_VAR) | ||
| Write-Host "[$(Get-Date)] STARTING: $testcase ($llm) [$environment]" | ||
| # Create log file with header | ||
| @" | ||
| ======================================== | ||
| TESTCASE: $testcase | ||
| LLM: $llm | ||
| ENVIRONMENT: $environment | ||
| USE_AZURE_CHAT: $use_azure_chat | ||
| STARTED_AT: $(Get-Date) | ||
| ======================================== | ||
| "@ | Out-File -FilePath $log_file -Encoding utf8 | ||
| # Run the testcase and append to log file | ||
| $dockerArgs = @( | ||
| "run", "--rm", | ||
| "-e", "CLIENT_ID=$CLIENT_ID_VAR", | ||
| "-e", "CLIENT_SECRET=$CLIENT_SECRET_VAR", | ||
| "-e", "BASE_URL=$BASE_URL_VAR", | ||
| "-e", "USE_AZURE_CHAT=$use_azure_chat", | ||
| "uipath-langchain-testbase:latest", | ||
| "bash", "/app/testcases/$testcase/run.sh" | ||
| ) | ||
| $process = Start-Process -FilePath "docker" -ArgumentList $dockerArgs -Wait -PassThru -RedirectStandardOutput "temp_$log_file" -RedirectStandardError "temp_err_$log_file" -NoNewWindow | ||
| # Append output to log file | ||
| if (Test-Path "temp_$log_file") { | ||
| Get-Content "temp_$log_file" | Add-Content -Path $log_file | ||
| Remove-Item "temp_$log_file" | ||
| } | ||
| if (Test-Path "temp_err_$log_file") { | ||
| Get-Content "temp_err_$log_file" | Add-Content -Path $log_file | ||
| Remove-Item "temp_err_$log_file" | ||
| } | ||
| $exit_code = $process.ExitCode | ||
| # Add completion status to log file | ||
| if ($exit_code -eq 0) { | ||
| Write-Host "[$(Get-Date)] SUCCESS: $testcase ($llm) [$environment]" | ||
| @" | ||
| ========================================= | ||
| COMPLETED_AT: $(Get-Date) | ||
| STATUS: SUCCESS | ||
| ========================================= | ||
| "@ | Add-Content -Path $log_file | ||
| } else { | ||
| Write-Host "[$(Get-Date)] FAILED: $testcase ($llm) [$environment]" | ||
| @" | ||
| ======================================== | ||
| COMPLETED_AT: $(Get-Date) | ||
| STATUS: FAILED | ||
| EXIT_CODE: $exit_code | ||
| ======================================== | ||
| "@ | Add-Content -Path $log_file | ||
| } | ||
| } | ||
| $backgroundJobs += Start-Job -ScriptBlock $scriptBlock -ArgumentList $testcase, $llm, $environment, $log_file, $use_azure_chat, $CLIENT_ID_VAR, $CLIENT_SECRET_VAR, $BASE_URL_VAR | ||
| } | ||
| # Wait for all jobs to complete | ||
| $backgroundJobs | Wait-Job | Receive-Job | ||
| $backgroundJobs | Remove-Job | ||
| Write-Host "All testcases execution completed." | ||
| shell: pwsh | ||
| - name: Display company-research-agent (UiPathAzureChatOpenAI) Alpha logs | ||
| run: | | ||
| $log_file = "run_company-research-agent_UiPathAzureChatOpenAI_alpha.log" | ||
| Write-Host "================================================" | ||
| Write-Host "COMPANY-RESEARCH-AGENT (UiPathAzureChatOpenAI) ALPHA LOG" | ||
| Write-Host "Log file: $log_file" | ||
| Write-Host "================================================" | ||
| if (Test-Path $log_file) { | ||
| Get-Content $log_file | ||
| } else { | ||
| Write-Host "ERROR: Log file not found!" | ||
| } | ||
| shell: pwsh | ||
| - name: Display company-research-agent (UiPathChat) Alpha logs | ||
| run: | | ||
| $log_file = "run_company-research-agent_UiPathChat_alpha.log" | ||
| Write-Host "================================================" | ||
| Write-Host "COMPANY-RESEARCH-AGENT (UiPathChat) ALPHA LOG" | ||
| Write-Host "Log file: $log_file" | ||
| Write-Host "================================================" | ||
| if (Test-Path $log_file) { | ||
| Get-Content $log_file | ||
| } else { | ||
| Write-Host "ERROR: Log file not found!" | ||
| } | ||
| shell: pwsh | ||
| - name: Display company-research-agent (UiPathAzureChatOpenAI) Cloud logs | ||
| run: | | ||
| $log_file = "run_company-research-agent_UiPathAzureChatOpenAI_cloud.log" | ||
| Write-Host "================================================" | ||
| Write-Host "COMPANY-RESEARCH-AGENT (UiPathAzureChatOpenAI) CLOUD LOG" | ||
| Write-Host "Log file: $log_file" | ||
| Write-Host "================================================" | ||
| if (Test-Path $log_file) { | ||
| Get-Content $log_file | ||
| } else { | ||
| Write-Host "ERROR: Log file not found!" | ||
| } | ||
| shell: pwsh | ||
| - name: Display company-research-agent (UiPathChat) Cloud logs | ||
| run: | | ||
| $log_file = "run_company-research-agent_UiPathChat_cloud.log" | ||
| Write-Host "================================================" | ||
| Write-Host "COMPANY-RESEARCH-AGENT (UiPathChat) CLOUD LOG" | ||
| Write-Host "Log file: $log_file" | ||
| Write-Host "================================================" | ||
| if (Test-Path $log_file) { | ||
| Get-Content $log_file | ||
| } else { | ||
| Write-Host "ERROR: Log file not found!" | ||
| } | ||
| shell: pwsh | ||
| - name: Display simple-local-mcp (UiPathAzureChatOpenAI) Alpha logs | ||
| run: | | ||
| $log_file = "run_simple-local-mcp_UiPathAzureChatOpenAI_alpha.log" | ||
| Write-Host "================================================" | ||
| Write-Host "SIMPLE-LOCAL-MCP (UiPathAzureChatOpenAI) ALPHA LOG" | ||
| Write-Host "Log file: $log_file" | ||
| Write-Host "================================================" | ||
| if (Test-Path $log_file) { | ||
| Get-Content $log_file | ||
| } else { | ||
| Write-Host "ERROR: Log file not found!" | ||
| } | ||
| shell: pwsh | ||
| - name: Display simple-local-mcp (UiPathChat) Alpha logs | ||
| run: | | ||
| $log_file = "run_simple-local-mcp_UiPathChat_alpha.log" | ||
| Write-Host "================================================" | ||
| Write-Host "SIMPLE-LOCAL-MCP (UiPathChat) ALPHA LOG" | ||
| Write-Host "Log file: $log_file" | ||
| Write-Host "================================================" | ||
| if (Test-Path $log_file) { | ||
| Get-Content $log_file | ||
| } else { | ||
| Write-Host "ERROR: Log file not found!" | ||
| } | ||
| shell: pwsh | ||
| - name: Display simple-local-mcp (UiPathAzureChatOpenAI) Cloud logs | ||
| run: | | ||
| $log_file = "run_simple-local-mcp_UiPathAzureChatOpenAI_cloud.log" | ||
| Write-Host "================================================" | ||
| Write-Host "SIMPLE-LOCAL-MCP (UiPathAzureChatOpenAI) CLOUD LOG" | ||
| Write-Host "Log file: $log_file" | ||
| Write-Host "================================================" | ||
| if (Test-Path $log_file) { | ||
| Get-Content $log_file | ||
| } else { | ||
| Write-Host "ERROR: Log file not found!" | ||
| } | ||
| shell: pwsh | ||
| - name: Display simple-local-mcp (UiPathChat) Cloud logs | ||
| run: | | ||
| $log_file = "run_simple-local-mcp_UiPathChat_cloud.log" | ||
| Write-Host "================================================" | ||
| Write-Host "SIMPLE-LOCAL-MCP (UiPathChat) CLOUD LOG" | ||
| Write-Host "Log file: $log_file" | ||
| Write-Host "================================================" | ||
| if (Test-Path $log_file) { | ||
| Get-Content $log_file | ||
| } else { | ||
| Write-Host "ERROR: Log file not found!" | ||
| } | ||
| shell: pwsh | ||
| - name: Display ticket-classification (UiPathAzureChatOpenAI) Alpha logs | ||
| run: | | ||
| $log_file = "run_ticket-classification_UiPathAzureChatOpenAI_alpha.log" | ||
| Write-Host "================================================" | ||
| Write-Host "TICKET-CLASSIFICATION (UiPathAzureChatOpenAI) ALPHA LOG" | ||
| Write-Host "Log file: $log_file" | ||
| Write-Host "================================================" | ||
| if (Test-Path $log_file) { | ||
| Get-Content $log_file | ||
| } else { | ||
| Write-Host "ERROR: Log file not found!" | ||
| } | ||
| shell: pwsh | ||
| - name: Display ticket-classification (UiPathChat) Alpha logs | ||
| run: | | ||
| $log_file = "run_ticket-classification_UiPathChat_alpha.log" | ||
| Write-Host "================================================" | ||
| Write-Host "TICKET-CLASSIFICATION (UiPathChat) ALPHA LOG" | ||
| Write-Host "Log file: $log_file" | ||
| Write-Host "================================================" | ||
| if (Test-Path $log_file) { | ||
| Get-Content $log_file | ||
| } else { | ||
| Write-Host "ERROR: Log file not found!" | ||
| } | ||
| shell: pwsh | ||
| - name: Display ticket-classification (UiPathAzureChatOpenAI) Cloud logs | ||
| run: | | ||
| $log_file = "run_ticket-classification_UiPathAzureChatOpenAI_cloud.log" | ||
| Write-Host "================================================" | ||
| Write-Host "TICKET-CLASSIFICATION (UiPathAzureChatOpenAI) CLOUD LOG" | ||
| Write-Host "Log file: $log_file" | ||
| Write-Host "================================================" | ||
| if (Test-Path $log_file) { | ||
| Get-Content $log_file | ||
| } else { | ||
| Write-Host "ERROR: Log file not found!" | ||
| } | ||
| shell: pwsh | ||
| - name: Display ticket-classification (UiPathChat) Cloud logs | ||
| run: | | ||
| $log_file = "run_ticket-classification_UiPathChat_cloud.log" | ||
| Write-Host "================================================" | ||
| Write-Host "TICKET-CLASSIFICATION (UiPathChat) CLOUD LOG" | ||
| Write-Host "Log file: $log_file" | ||
| Write-Host "================================================" | ||
| if (Test-Path $log_file) { | ||
| Get-Content $log_file | ||
| } else { | ||
| Write-Host "ERROR: Log file not found!" | ||
| } | ||
| shell: pwsh | ||
| - name: Display multi-agent-supervisor-researcher-coder (UiPathAzureChatOpenAI) Alpha logs | ||
| run: | | ||
| $log_file = "run_multi-agent-supervisor-researcher-coder_UiPathAzureChatOpenAI_alpha.log" | ||
| Write-Host "================================================" | ||
| Write-Host "MULTI-AGENT-SUPERVISOR-RESEARCHER-CODER (UiPathAzureChatOpenAI) ALPHA LOG" | ||
| Write-Host "Log file: $log_file" | ||
| Write-Host "================================================" | ||
| if (Test-Path $log_file) { | ||
| Get-Content $log_file | ||
| } else { | ||
| Write-Host "ERROR: Log file not found!" | ||
| } | ||
| shell: pwsh | ||
| - name: Display multi-agent-supervisor-researcher-coder (UiPathChat) Alpha logs | ||
| run: | | ||
| $log_file = "run_multi-agent-supervisor-researcher-coder_UiPathChat_alpha.log" | ||
| Write-Host "================================================" | ||
| Write-Host "MULTI-AGENT-SUPERVISOR-RESEARCHER-CODER (UiPathChat) ALPHA LOG" | ||
| Write-Host "Log file: $log_file" | ||
| Write-Host "================================================" | ||
| if (Test-Path $log_file) { | ||
| Get-Content $log_file | ||
| } else { | ||
| Write-Host "ERROR: Log file not found!" | ||
| } | ||
| shell: pwsh | ||
| - name: Display multi-agent-supervisor-researcher-coder (UiPathAzureChatOpenAI) Cloud logs | ||
| run: | | ||
| $log_file = "run_multi-agent-supervisor-researcher-coder_UiPathAzureChatOpenAI_cloud.log" | ||
| Write-Host "================================================" | ||
| Write-Host "MULTI-AGENT-SUPERVISOR-RESEARCHER-CODER (UiPathAzureChatOpenAI) CLOUD LOG" | ||
| Write-Host "Log file: $log_file" | ||
| Write-Host "================================================" | ||
| if (Test-Path $log_file) { | ||
| Get-Content $log_file | ||
| } else { | ||
| Write-Host "ERROR: Log file not found!" | ||
| } | ||
| shell: pwsh | ||
| - name: Display multi-agent-supervisor-researcher-coder (UiPathChat) Cloud logs | ||
| run: | | ||
| $log_file = "run_multi-agent-supervisor-researcher-coder_UiPathChat_cloud.log" | ||
| Write-Host "================================================" | ||
| Write-Host "MULTI-AGENT-SUPERVISOR-RESEARCHER-CODER (UiPathChat) CLOUD LOG" | ||
| Write-Host "Log file: $log_file" | ||
| Write-Host "================================================" | ||
| if (Test-Path $log_file) { | ||
| Get-Content $log_file | ||
| } else { | ||
| Write-Host "ERROR: Log file not found!" | ||
| } | ||
| shell: pwsh | ||