Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 20 additions & 27 deletions .github/workflows/integration_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,63 +19,56 @@ jobs:
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
container:
image: ghcr.io/astral-sh/uv:python3.12-bookworm
Copy link
Collaborator

@radu-mocanu radu-mocanu Oct 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't we test with other python versions as well?

env:
UIPATH_JOB_KEY: "3a03d5cb-fa21-4021-894d-a8e2eda0afe0"
strategy:
fail-fast: false
matrix:
testcase: ${{ fromJson(needs.discover-testcases.outputs.testcases) }}
environment: [alpha, cloud]
environment: [alpha, staging, 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: Install Dependencies
run: uv sync

- 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 }}
CLIENT_ID: ${{ matrix.environment == 'alpha' && secrets.ALPHA_TEST_CLIENT_ID || matrix.environment == 'staging' && secrets.STAGING_TEST_CLIENT_ID || matrix.environment == 'cloud' && secrets.CLOUD_TEST_CLIENT_ID }}
CLIENT_SECRET: ${{ matrix.environment == 'alpha' && secrets.ALPHA_TEST_CLIENT_SECRET || matrix.environment == 'staging' && secrets.STAGING_TEST_CLIENT_SECRET || matrix.environment == 'cloud' && secrets.CLOUD_TEST_CLIENT_SECRET }}
BASE_URL: ${{ matrix.environment == 'alpha' && secrets.ALPHA_BASE_URL || matrix.environment == 'staging' && secrets.STAGING_BASE_URL || matrix.environment == 'cloud' && secrets.CLOUD_BASE_URL }}
USE_AZURE_CHAT: ${{ matrix.use_azure_chat }}
working-directory: testcases/${{ matrix.testcase }}
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

# Execute the testcase run script directly
bash run.sh
bash ../common/validate_output.sh
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ cython_debug/
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
.idea/

# Ruff stuff:
.ruff_cache/
Expand All @@ -178,4 +178,4 @@ cython_debug/
**/.uipath
**/**.nupkg
**/__uipath/
**/.langgraph_api
**/.langgraph_api
16 changes: 0 additions & 16 deletions testcases/Dockerfile

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/bin/bash

# Common utility to print UiPath output file
# Usage: source /app/testcases/common/print_output.sh
# Usage: source /app/testcases/common/validate_output.sh

print_uipath_output() {
debug_print_uipath_output() {
echo "Printing output file..."
if [ -f "__uipath/output.json" ]; then
echo "=== OUTPUT FILE CONTENT ==="
Expand All @@ -21,3 +21,15 @@ print_uipath_output() {
fi
fi
}

validate_output() {
echo "Printing output file for validation..."
debug_print_uipath_output

echo "Validating output..."
python src/assert.py || { echo "Validation failed!"; exit 1; }

echo "Testcase completed successfully."
}

validate_output
16 changes: 6 additions & 10 deletions testcases/company-research-agent/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,18 @@ uv sync

# Authenticate with UiPath
echo "Authenticating with UiPath..."
uv run uipath auth --client-id="$CLIENT_ID" --client-secret="$CLIENT_SECRET" --base-url="$BASE_URL"
uv run uipath auth --client-id="$CLIENT_ID" --client-secret="$CLIENT_SECRET" --base-url="$BASE_URL"

# Initialize the project
echo "Initializing the project..."
uv run uipath init

# Pack the agent
echo "Packing agent..."
uv run uipath pack

# Run the agent
echo "Running agent..."
echo "Input from input.json file"
uv run uipath run agent --file input.json

# Print the output file
source /app/testcases/common/print_output.sh
print_uipath_output

# Validate output
echo "Validating output..."
python src/assert.py || { echo "Validation failed!"; exit 1; }

echo "Testcase completed successfully."
14 changes: 5 additions & 9 deletions testcases/simple-local-mcp/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,16 @@ uv sync
echo "Authenticating with UiPath..."
uv run uipath auth --client-id="$CLIENT_ID" --client-secret="$CLIENT_SECRET" --base-url="$BASE_URL"

# Initialize the project
echo "Initializing the project..."
uv run uipath init

# Pack the agent
echo "Packing agent..."
uv run uipath pack

# Run the agent
echo "Running agent..."
echo "Input from input.json file"
uv run uipath run agent --file input.json

# Print the output file
source /app/testcases/common/print_output.sh
print_uipath_output

# Validate output
echo "Validating output..."
python src/assert.py || { echo "Validation failed!"; exit 1; }

echo "Testcase completed successfully."
14 changes: 4 additions & 10 deletions testcases/ticket-classification/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ uv sync
echo "Authenticating with UiPath..."
uv run uipath auth --client-id="$CLIENT_ID" --client-secret="$CLIENT_SECRET" --base-url="$BASE_URL"

# Initialize the project
echo "Initializing the project..."
uv run uipath init

# Pack the agent
echo "Packing agent..."
uv run uipath pack
Expand All @@ -22,13 +26,3 @@ uv run uipath run agent --file input.json
echo "Resuming agent run by default with {'Answer': true}..."
uv run uipath run agent '{"Answer": true}' --resume;


# Print the output file
source /app/testcases/common/print_output.sh
print_uipath_output

# Validate output
echo "Validating output..."
python src/assert.py || { echo "Validation failed!"; exit 1; }

echo "Testcase completed successfully."