Skip to content
Merged
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
7 changes: 7 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
test:uipath-langchain:
- changed-files:
- any-glob-to-any-file: ['src/**/*.py']

test:uipath:
- changed-files:
- any-glob-to-any-file: ['src/**/*.py']
19 changes: 19 additions & 0 deletions .github/workflows/auto-label.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Auto Label PRs

on:
pull_request:
types: [opened, synchronize, reopened]

permissions:
contents: read
pull-requests: write

jobs:
label:
runs-on: ubuntu-latest
steps:
- name: Label PR
uses: actions/labeler@v5
with:
configuration-path: '.github/labeler.yml'
sync-labels: true
144 changes: 144 additions & 0 deletions .github/workflows/test-uipath-langchain.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
name: Test UiPath Langchain

on:
pull_request:
types: [ opened, synchronize, reopened, labeled ]

jobs:
test-uipath-langchain:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [ "3.11", "3.12", "3.13" ]
os: [ ubuntu-latest, windows-latest ]

permissions:
contents: read

# Only run if PR has the test:uipath-langchain label
if: contains(github.event.pull_request.labels.*.name, 'test:uipath-langchain')

steps:
- name: Checkout uipath-runtime-python
uses: actions/checkout@v4
with:
path: 'uipath-runtime-python'

- name: Setup uv
uses: astral-sh/setup-uv@v5

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Build uipath-runtime package
working-directory: uipath-runtime-python
run: uv build

- name: Checkout uipath-langchain-python
uses: actions/checkout@v4
with:
repository: 'UiPath/uipath-langchain-python'
path: 'uipath-langchain-python'

- name: Update uipath-runtime version
shell: bash
working-directory: uipath-langchain-python
run: uv add ../uipath-runtime-python/dist/*.whl --dev

- name: Run uipath-langchain tests
working-directory: uipath-langchain-python
run: |
uv sync --all-extras
uv run pytest

discover-testcases:
runs-on: ubuntu-latest
permissions:
contents: read
needs: [test-uipath-langchain]
outputs:
testcases: ${{ steps.discover.outputs.testcases }}
steps:
- name: Checkout uipath-langchain-python
uses: actions/checkout@v4
with:
repository: 'UiPath/uipath-langchain-python'
path: 'uipath-langchain-python'

- name: Discover testcases
id: discover
working-directory: uipath-langchain-python
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

run-uipath-langchain-integration-tests:
runs-on: ubuntu-latest
needs: [discover-testcases]
container:
image: ghcr.io/astral-sh/uv:python3.12-bookworm
env:
UIPATH_JOB_KEY: "3a03d5cb-fa21-4021-894d-a8e2eda0afe0"
permissions:
contents: read
strategy:
fail-fast: false
matrix:
testcase: ${{ fromJson(needs.discover-testcases.outputs.testcases) }}
environment: [alpha, staging] # temporary disable [cloud]
Copy link

Copilot AI Feb 16, 2026

Choose a reason for hiding this comment

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

The comment "temporary disable [cloud]" suggests this is a temporary state. If this is indeed temporary, consider creating a tracking issue and referencing it in the comment (e.g., "# TODO(#123): Re-enable cloud environment"). If this is intended to be permanent, remove the "temporary" wording to avoid confusion.

Suggested change
environment: [alpha, staging] # temporary disable [cloud]
environment: [alpha, staging] # TODO: Re-enable cloud environment in test matrix

Copilot uses AI. Check for mistakes.
use_azure_chat: [true, false]

name: "${{ matrix.testcase }} / ${{ matrix.environment }} / ${{ matrix.use_azure_chat && 'UiPathAzureChatOpenAI' || 'UiPathChat' }}"

steps:
- name: Checkout uipath-runtime-python
uses: actions/checkout@v4
with:
path: 'uipath-runtime-python'

- name: Build uipath-runtime package
working-directory: uipath-runtime-python
run: uv build

- name: Checkout uipath-langchain-python
uses: actions/checkout@v4
with:
repository: 'UiPath/uipath-langchain-python'
path: 'uipath-langchain-python'

- name: Update uipath-runtime version
shell: bash
working-directory: uipath-langchain-python
run: uv add ../uipath-runtime-python/dist/*.whl --dev
Copy link

Copilot AI Feb 16, 2026

Choose a reason for hiding this comment

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

The wildcard pattern '../uipath-runtime-python/dist/*.whl' in the integration tests assumes only one wheel file will be built. If multiple wheel files exist in the dist directory, the 'uv add' command behavior may be unpredictable. Consider adding a cleanup step before building or being more specific about which wheel to add.

Copilot uses AI. Check for mistakes.

- name: Install dependencies
working-directory: uipath-langchain-python
run: uv sync

- name: Run testcase
env:
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 }}
UV_PYTHON: "3.12"
working-directory: uipath-langchain-python/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 }}"

# Execute the testcase run script directly
bash run.sh
bash ../common/validate_output.sh

141 changes: 141 additions & 0 deletions .github/workflows/test-uipath.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
name: Test UiPath
Copy link

Copilot AI Feb 16, 2026

Choose a reason for hiding this comment

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

The workflow name "Test UiPath Langchain" is incorrect for this file. This workflow tests the uipath-python repository, not uipath-langchain-python. The name should be "Test UiPath" to match the workflow purpose and differentiate it from the test-uipath-langchain.yml workflow.

Copilot uses AI. Check for mistakes.

on:
pull_request:
types: [ opened, synchronize, reopened, labeled ]

jobs:
test-uipath:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [ "3.11", "3.12", "3.13" ]
os: [ ubuntu-latest, windows-latest ]

permissions:
contents: read

# Only run if PR has the test:uipath label
if: contains(github.event.pull_request.labels.*.name, 'test:uipath')

steps:
- name: Checkout uipath-runtime-python
uses: actions/checkout@v4
with:
path: 'uipath-runtime-python'

- name: Setup uv
uses: astral-sh/setup-uv@v5

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Build uipath-runtime package
working-directory: uipath-runtime-python
run: uv build

- name: Checkout uipath-python
uses: actions/checkout@v4
with:
repository: 'UiPath/uipath-python'
path: 'uipath-python'

- name: Update uipath-runtime version
shell: bash
working-directory: uipath-python
run: uv add ../uipath-runtime-python/dist/*.whl --dev

- name: Run uipath tests
working-directory: uipath-python
run: |
uv sync --all-extras
uv run pytest

discover-testcases:
runs-on: ubuntu-latest
permissions:
contents: read
needs: [test-uipath]
outputs:
testcases: ${{ steps.discover.outputs.testcases }}
steps:
- name: Checkout uipath-python
uses: actions/checkout@v4
with:
repository: 'UiPath/uipath-python'
path: 'uipath-python'

- name: Discover testcases
id: discover
working-directory: uipath-python
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

run-uipath-integration-tests:
runs-on: ubuntu-latest
needs: [discover-testcases]
container:
image: ghcr.io/astral-sh/uv:python3.12-bookworm
env:
UIPATH_JOB_KEY: "3a03d5cb-fa21-4021-894d-a8e2eda0afe0"
permissions:
contents: read
strategy:
fail-fast: false
matrix:
testcase: ${{ fromJson(needs.discover-testcases.outputs.testcases) }}
environment: [alpha, staging] # temporary disable [cloud]
Copy link

Copilot AI Feb 16, 2026

Choose a reason for hiding this comment

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

The comment "temporary disable [cloud]" suggests this is a temporary state. If this is indeed temporary, consider creating a tracking issue and referencing it in the comment (e.g., "# TODO(#123): Re-enable cloud environment"). If this is intended to be permanent, remove the "temporary" wording to avoid confusion.

Suggested change
environment: [alpha, staging] # temporary disable [cloud]
environment: [alpha, staging] # TODO: Re-enable cloud environment when it is ready

Copilot uses AI. Check for mistakes.

name: "${{ matrix.testcase }} / ${{ matrix.environment }}"

steps:
- name: Checkout uipath-runtime-python
uses: actions/checkout@v4
with:
path: 'uipath-runtime-python'

- name: Build uipath-runtime package
working-directory: uipath-runtime-python
run: uv build

- name: Checkout uipath-python
uses: actions/checkout@v4
with:
repository: 'UiPath/uipath-python'
path: 'uipath-python'

- name: Update uipath-runtime version
shell: bash
working-directory: uipath-python
run: uv add ../uipath-runtime-python/dist/*.whl --dev
Copy link

Copilot AI Feb 16, 2026

Choose a reason for hiding this comment

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

The wildcard pattern '../uipath-runtime-python/dist/*.whl' in the integration tests assumes only one wheel file will be built. If multiple wheel files exist in the dist directory, the 'uv add' command behavior may be unpredictable. Consider adding a cleanup step before building or being more specific about which wheel to add.

Copilot uses AI. Check for mistakes.

- name: Install dependencies
working-directory: uipath-python
run: uv sync

- name: Run testcase
env:
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 }}
UV_PYTHON: "3.12"
working-directory: uipath-python/testcases/${{ matrix.testcase }}
run: |
echo "Running testcase: ${{ matrix.testcase }}"
echo "Environment: ${{ matrix.environment }}"

# Execute the testcase run script directly
Comment on lines +131 to +138
Copy link

Copilot AI Feb 16, 2026

Choose a reason for hiding this comment

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

The matrix.use_azure_chat variable is referenced in the environment variable USE_AZURE_CHAT and in the debug output, but it's not defined in the matrix strategy. Unlike the test-uipath-langchain.yml workflow, this workflow's matrix only includes 'testcase' and 'environment'. Either add 'use_azure_chat: [true, false]' to the matrix at line 95-97, or remove the references to this variable if it's not needed for the uipath-python tests.

Copilot uses AI. Check for mistakes.
bash run.sh
bash ../common/validate_output.sh

Loading