Skip to content

🧪 Integration Testing #53

🧪 Integration Testing

🧪 Integration Testing #53

name: "🧪 Integration Testing"
on:
workflow_dispatch:
inputs:
working-directory:
required: true
type: choice
default: libs/ibm
options:
- libs/ibm
- libs/langchain-db2
fork:
required: true
type: string
default: 'langchain-ai'
description: "Which fork to run this test against"
branch:
required: true
type: string
default: 'main'
description: "Which branch to run this test against"
test-file:
required: true
type: string
default: "tests/integration_tests/**/test*.py"
description: "Which test file to run"
python-version:
required: false
type: string
default: "3.11"
description: "Python version to use"
permissions:
contents: read
env:
UV_FROZEN: "true"
UV_NO_SYNC: "true"
jobs:
build:
defaults:
run:
working-directory: ${{ inputs.working-directory }}
runs-on: ubuntu-latest
name: "make integration_tests #${{ inputs.python-version }}"
steps:
- uses: actions/checkout@v6
with:
repository: "${{ inputs.fork }}/langchain-ibm"
ref: "${{ inputs.branch }}"
- name: "🐍 Set up Python ${{ inputs.python-version }} + UV"
uses: "./.github/actions/uv_setup"
with:
python-version: ${{ inputs.python-version }}
- name: "📦 Install Dependencies"
shell: bash
run: uv sync --group test --group test_integration
- name: "🧪 Run Integration Tests"
shell: bash
env:
WATSONX_APIKEY: ${{ secrets.WATSONX_APIKEY }}
WATSONX_PROJECT_ID: ${{ secrets.WATSONX_PROJECT_ID }}
run: |
make integration_tests
- name: "🧹 Verify Clean Working Directory"
shell: bash
run: |
set -eu
STATUS="$(git status)"
echo "$STATUS"
# grep will exit non-zero if the target message isn't found,
# and `set -e` above will cause the step to fail.
echo "$STATUS" | grep 'nothing to commit, working tree clean'