5a558eb09e
Backend Tests / discover-tests (push) Waiting to run
Backend Tests / ${{ matrix.name }} (push) Blocked by required conditions
Build and Publish SDK / build-and-publish (push) Waiting to run
Build Opik Docker Images / set-version (push) Waiting to run
Build Opik Docker Images / build-backend (push) Blocked by required conditions
Build Opik Docker Images / build-sandbox-executor-python (push) Blocked by required conditions
Build Opik Docker Images / build-python-backend (push) Blocked by required conditions
Build Opik Docker Images / build-frontend (push) Blocked by required conditions
Build Opik Docker Images / create-git-tag (push) Blocked by required conditions
ClickHouse Migration Cluster Check / validate-clickhouse-migrations (push) Waiting to run
Docs - Publish / run (push) Waiting to run
E2E Tests - Post Merge (v2) / 🧪 E2E v2 Tests (${{ github.event.inputs.tier || 't1' }}) (push) Waiting to run
E2E Tests - Post Merge (v2) / 📢 Slack Notification (push) Blocked by required conditions
Frontend Unit Tests / Test on Node 20 (push) Waiting to run
Guardrails E2E Tests / Select Python version matrix (push) Waiting to run
Guardrails E2E Tests / Guardrails E2E Tests ${{matrix.python_version}} (push) Blocked by required conditions
Guardrails E2E Tests / 📢 Slack Notification (push) Blocked by required conditions
Guardrails Backend Unit Tests / Guardrails Backend Unit Tests (push) Waiting to run
Guardrails Backend Unit Tests / 📢 Slack Notification (push) Blocked by required conditions
SDK Library Integration Tests Runner / Check Secrets (push) Waiting to run
SDK Library Integration Tests Runner / Missed OpenAI API Key Warning (push) Blocked by required conditions
SDK Library Integration Tests Runner / Build (push) Blocked by required conditions
SDK Library Integration Tests Runner / openai_tests (push) Blocked by required conditions
SDK Library Integration Tests Runner / langchain_tests (push) Blocked by required conditions
SDK Library Integration Tests Runner / langchain_legacy_tests (push) Blocked by required conditions
SDK Library Integration Tests Runner / llama_index_tests (push) Blocked by required conditions
SDK Library Integration Tests Runner / anthropic_tests (push) Blocked by required conditions
SDK Library Integration Tests Runner / mistral_tests (push) Blocked by required conditions
SDK Library Integration Tests Runner / groq_tests (push) Blocked by required conditions
SDK Library Integration Tests Runner / aisuite_tests (push) Blocked by required conditions
SDK Library Integration Tests Runner / haystack_tests (push) Blocked by required conditions
SDK Library Integration Tests Runner / dspy_tests (push) Blocked by required conditions
SDK Library Integration Tests Runner / crewai_v0_tests (push) Blocked by required conditions
SDK Library Integration Tests Runner / crewai_v1_tests (push) Blocked by required conditions
SDK Library Integration Tests Runner / genai_tests (push) Blocked by required conditions
SDK Library Integration Tests Runner / adk_tests (push) Blocked by required conditions
SDK Library Integration Tests Runner / adk_legacy_1_3_0_tests (push) Blocked by required conditions
SDK Library Integration Tests Runner / evaluation_metrics_tests (push) Blocked by required conditions
SDK Library Integration Tests Runner / bedrock_tests (push) Blocked by required conditions
SDK Library Integration Tests Runner / litellm_tests (push) Blocked by required conditions
SDK Library Integration Tests Runner / harbor_tests (push) Blocked by required conditions
SDK Library Integration Tests Runner / Slack Notification (push) Blocked by required conditions
Lint Opik Helm Chart / lint-helm-chart (Helm v3.21.0) (push) Waiting to run
Lint Opik Helm Chart / lint-helm-chart (Helm v4.2.0) (push) Waiting to run
Lint Opik Helm Chart / unittest-helm-chart (push) Waiting to run
Lint Opik Helm Chart / render-equality (push) Waiting to run
Opik Optimizer - Unit Tests / Opik Optimizer Unit Tests Python ${{matrix.python_version}} (push) Waiting to run
Python BE E2E Tests / Python BE E2E (push) Waiting to run
Python Backend Tests / run-python-backend-tests (push) Waiting to run
Python SDK Unit Tests / Python SDK Unit Tests ${{matrix.python_version}} (push) Waiting to run
Release Drafter / update_release_draft (push) Waiting to run
SDK E2E Libraries Integration Tests / Check Secrets (push) Waiting to run
SDK E2E Libraries Integration Tests / Missed OpenAI API Key Warning (push) Blocked by required conditions
SDK E2E Libraries Integration Tests / build-opik (push) Blocked by required conditions
SDK E2E Libraries Integration Tests / E2E Lib Integration Python ${{matrix.python_version}} (push) Blocked by required conditions
TypeScript SDK Integration Build & Publish / build-and-publish (opik-gemini) (push) Waiting to run
TypeScript SDK Integration Build & Publish / build-and-publish (opik-langchain) (push) Waiting to run
TypeScript SDK Integration Build & Publish / build-and-publish (opik-openai) (push) Waiting to run
TypeScript SDK Integration Build & Publish / build-and-publish (opik-otel) (push) Waiting to run
TypeScript SDK Integration Build & Publish / build-and-publish (opik-vercel) (push) Waiting to run
TypeScript SDK Library Integration Tests / Check Secrets (push) Waiting to run
TypeScript SDK Library Integration Tests / opik-vercel (Vercel AI SDK / eve) (push) Blocked by required conditions
TypeScript SDK Build & Publish / build-and-publish (push) Waiting to run
TypeScript SDK Unit Tests / Test on Node ${{ matrix.node-version }} (push) Waiting to run
TypeScript SDK Compatibility V1.x E2E Tests / Select Node version matrix (push) Has been cancelled
TypeScript SDK Compatibility V1.x E2E Tests / TypeScript SDK Compatibility V1.x E2E Tests Node ${{matrix.node_version}} (push) Has been cancelled
TypeScript SDK E2E Tests / TypeScript SDK E2E Tests Node ${{matrix.node_version}} (push) Has been cancelled
Opik Optimizer - E2E Tests / build-opik (push) Has been cancelled
TypeScript SDK Compatibility V1.x E2E Tests / build-opik (push) Has been cancelled
Python SDK E2E Tests / Select Python version matrix (push) Has been cancelled
Python SDK E2E Tests / Python SDK E2E Tests ${{matrix.python_version}} (push) Has been cancelled
Python SDK E2E Tests / build-opik (push) Has been cancelled
Python SDK Compatibility V1.x E2E Tests / Select Python version matrix (push) Has been cancelled
Python SDK Compatibility V1.x E2E Tests / Python SDK Compatibility V1.x E2E Tests ${{matrix.python_version}} (push) Has been cancelled
Python SDK Compatibility V1.x E2E Tests / build-opik (push) Has been cancelled
TypeScript SDK E2E Tests / Select Node version matrix (push) Has been cancelled
TypeScript SDK E2E Tests / build-opik (push) Has been cancelled
Opik Optimizer - E2E Tests / Opik Optimizer E2E Tests Python ${{matrix.python_version}} (push) Has been cancelled
Opik Optimizer - E2E Tests / Opik Optimizer Integration Smoke Tests (push) Has been cancelled
🐙 Code Quality / detect (push) Has been cancelled
🐙 Code Quality / lint (${{ matrix.leg.name }}) (push) Has been cancelled
🐙 Code Quality / summary (push) Has been cancelled
173 lines
6.6 KiB
YAML
173 lines
6.6 KiB
YAML
name: Python SDK E2E Tests
|
|
run-name: "Python SDK E2E Tests ${{ github.ref_name }} by @${{ github.actor }}"
|
|
permissions:
|
|
contents: read
|
|
checks: write
|
|
pull-requests: write
|
|
packages: write
|
|
on:
|
|
workflow_dispatch:
|
|
pull_request:
|
|
paths:
|
|
- 'sdks/python/**'
|
|
- 'apps/opik-backend/**'
|
|
- '.github/workflows/python_sdk_e2e_tests.yml'
|
|
push:
|
|
branches:
|
|
- 'main'
|
|
paths:
|
|
- 'sdks/python/**'
|
|
- 'apps/opik-backend/**'
|
|
- '.github/workflows/python_sdk_e2e_tests.yml'
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
env:
|
|
OPIK_ENABLE_LITELLM_MODELS_MONITORING: False
|
|
OPIK_SENTRY_ENABLE: False
|
|
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
|
|
OPENAI_ORG_ID: ${{ secrets.OPENAI_ORG_ID }}
|
|
OPIK_URL_OVERRIDE: http://localhost:8080
|
|
OPIK_CONSOLE_LOGGING_LEVEL: INFO
|
|
jobs:
|
|
select-matrix:
|
|
name: Select Python version matrix
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 2
|
|
outputs:
|
|
python_versions: ${{ steps.pick.outputs.versions }}
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
with:
|
|
sparse-checkout: .github/actions/select-e2e-matrix
|
|
sparse-checkout-cone-mode: false
|
|
- uses: ./.github/actions/select-e2e-matrix
|
|
id: pick
|
|
with:
|
|
all-versions: ${{ vars.PYTHON_VERSIONS }}
|
|
match-regex: '^sdks/python/|^\.github/workflows/python_sdk_e2e_tests\.yml$'
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
build-opik:
|
|
uses: ./.github/workflows/build_e2e_docker.yaml
|
|
with:
|
|
include_guardrails: true
|
|
|
|
run-e2e:
|
|
needs: [select-matrix, build-opik]
|
|
name: Python SDK E2E Tests ${{matrix.python_version}}
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 30
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
python_version: ${{ fromJSON(needs.select-matrix.outputs.python_versions) }}
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v6
|
|
|
|
- name: Login to GHCR
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Pull Docker images from GHCR
|
|
env:
|
|
TAG: ${{ needs.build-opik.outputs.image_tag }}
|
|
run: |
|
|
docker pull "ghcr.io/comet-ml/opik/opik-backend:$TAG"
|
|
docker pull "ghcr.io/comet-ml/opik/opik-python-backend:$TAG"
|
|
docker pull "ghcr.io/comet-ml/opik/opik-guardrails-backend:$TAG"
|
|
docker tag "ghcr.io/comet-ml/opik/opik-backend:$TAG" ghcr.io/comet-ml/opik/opik-backend:latest
|
|
docker tag "ghcr.io/comet-ml/opik/opik-python-backend:$TAG" ghcr.io/comet-ml/opik/opik-python-backend:latest
|
|
docker tag "ghcr.io/comet-ml/opik/opik-guardrails-backend:$TAG" ghcr.io/comet-ml/opik/opik-guardrails-backend:latest
|
|
|
|
- name: Setup Python ${{matrix.python_version}}
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: ${{matrix.python_version}}
|
|
|
|
- name: Run latest Opik server
|
|
env:
|
|
OPIK_USAGE_REPORT_ENABLED: false
|
|
# Avoid Buildx Bake concurrent image export collisions in CI.
|
|
COMPOSE_BAKE: false
|
|
TOGGLE_RUNNERS_ENABLED: "true"
|
|
OPIK_BACKEND_PULL_POLICY: never
|
|
PYTHON_BACKEND_PULL_POLICY: never
|
|
OPIK_GUARDRAILS_BACKEND_PULL_POLICY: never
|
|
run: |
|
|
cd ${{ github.workspace }}
|
|
./opik.sh --backend --port-mapping --guardrails
|
|
|
|
- name: Check Opik server availability
|
|
shell: bash
|
|
run: |
|
|
chmod +x ${{ github.workspace }}/tests_end_to_end/installer_utils/*.sh
|
|
cd ${{ github.workspace }}/deployment/docker-compose
|
|
echo "Check Docker pods are up"
|
|
${{ github.workspace }}/tests_end_to_end/installer_utils/check_docker_compose_pods.sh
|
|
echo "Check backend health"
|
|
${{ github.workspace }}/tests_end_to_end/installer_utils/check_backend.sh
|
|
|
|
- name: Install opik SDK
|
|
run: |
|
|
cd ${{ github.workspace }}/sdks/python
|
|
pip install .
|
|
|
|
- name: Run smoke tests
|
|
run: |
|
|
cd ${{ github.workspace }}/sdks/python/tests/e2e_smoke
|
|
./smoke_tests_runner.sh
|
|
|
|
- name: Install test requirements
|
|
run: |
|
|
cd ${{ github.workspace }}/sdks/python
|
|
pip install -r tests/test_requirements.txt
|
|
pip list
|
|
|
|
- name: Run tests
|
|
# -n 3 + --dist=loadfile distributes whole test files across three
|
|
# worker processes (one file per worker). Past ~3 the gains
|
|
# flatten — we become tail-bound on the slowest single file and
|
|
# the docker-compose backend on the same runner starts to thrash.
|
|
# E2E isolation hinges on --dist=loadfile: the per-module project
|
|
# name (generate_project_name("e2e", __name__)) is only collision-
|
|
# free if a single file is not split across workers.
|
|
# -p no:benchmark silences pytest-benchmark's auto-disable warning
|
|
# under xdist.
|
|
run: |
|
|
cd ${{ github.workspace }}/sdks/python
|
|
pytest tests/e2e --ignore=tests/e2e/test_guardrails.py --ignore=tests/e2e/compatibility_v1 -vv -n 3 --dist=loadfile -p no:benchmark --durations=20 --junitxml=${{ github.workspace }}/test_results_${{matrix.python_version}}.xml
|
|
|
|
- name: Publish Test Report
|
|
uses: EnricoMi/publish-unit-test-result-action/linux@v2
|
|
if: always()
|
|
with:
|
|
action_fail: true
|
|
comment_mode: failures
|
|
check_name: Python SDK E2E Tests Results (Python ${{matrix.python_version}})
|
|
files: ${{ github.workspace }}/test_results_${{matrix.python_version}}.xml
|
|
|
|
- name: Keep BE log in case of failure
|
|
if: failure()
|
|
run: |
|
|
docker logs opik-backend-1 > ${{ github.workspace }}/opik-backend_p${{matrix.python_version}}.log
|
|
|
|
- name: Attach BE log
|
|
if: failure()
|
|
uses: actions/upload-artifact@v7
|
|
with:
|
|
name: opik-backend-log-p${{matrix.python_version}}
|
|
path: ${{ github.workspace }}/opik-backend_p${{matrix.python_version}}.log
|
|
|
|
- name: Stop opik server
|
|
if: always()
|
|
run: |
|
|
cd ${{ github.workspace }}
|
|
./opik.sh --stop --guardrails
|