[WIP] feat: implement streaming methods for chat models #335
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 ] | |
permissions: | |
contents: read | |
pull-requests: write | |
actions: read | |
jobs: | |
discover-testcases: | |
runs-on: ubuntu-latest | |
outputs: | |
testcases: ${{ steps.discover.outputs.testcases }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Discover testcases | |
id: discover | |
run: | | |
# Find all testcase folders (excluding common folders like README, etc.) | |
testcase_dirs=$(find testcases -maxdepth 1 -type d -name "*-*" | sed 's|testcases/||' | sort) | |
echo "Found testcase directories:" | |
echo "$testcase_dirs" | |
# Convert to JSON array for matrix | |
testcases_json=$(echo "$testcase_dirs" | jq -R -s -c 'split("\n")[:-1]') | |
echo "testcases=$testcases_json" >> $GITHUB_OUTPUT | |
integration-tests: | |
needs: [discover-testcases] | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
testcase: ${{ fromJson(needs.discover-testcases.outputs.testcases) }} | |
environment: [alpha, cloud] | |
use_azure_chat: [true, false] | |
name: "${{ matrix.testcase }} / ${{ matrix.environment }} / ${{ matrix.use_azure_chat && 'UiPathAzureChatOpenAI' || 'UiPathChat' }}" | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Build Docker image | |
run: | | |
echo "Building Docker image for ${{ matrix.testcase }} at $(date)" | |
docker build -f testcases/Dockerfile \ | |
-t uipath-langchain-testbase:latest \ | |
. | |
echo "Docker image built at $(date)" | |
- name: Run testcase | |
env: | |
CLIENT_ID: ${{ matrix.environment == 'alpha' && secrets.ALPHA_TEST_CLIENT_ID || secrets.CLOUD_TEST_CLIENT_ID }} | |
CLIENT_SECRET: ${{ matrix.environment == 'alpha' && secrets.ALPHA_TEST_CLIENT_SECRET || secrets.CLOUD_TEST_CLIENT_SECRET }} | |
BASE_URL: ${{ matrix.environment == 'alpha' && secrets.ALPHA_BASE_URL || secrets.CLOUD_BASE_URL }} | |
USE_AZURE_CHAT: ${{ matrix.use_azure_chat }} | |
run: | | |
echo "Running testcase: ${{ matrix.testcase }}" | |
echo "Environment: ${{ matrix.environment }}" | |
echo "LLM: ${{ matrix.use_azure_chat && 'UiPathAzureChatOpenAI' || 'UiPathChat' }}" | |
echo "USE_AZURE_CHAT: ${{ matrix.use_azure_chat }}" | |
docker run --rm \ | |
-e CLIENT_ID="$CLIENT_ID" \ | |
-e CLIENT_SECRET="$CLIENT_SECRET" \ | |
-e BASE_URL="$BASE_URL" \ | |
-e USE_AZURE_CHAT="$USE_AZURE_CHAT" \ | |
uipath-langchain-testbase:latest \ | |
bash /app/testcases/${{ matrix.testcase }}/run.sh |