Skip to content
Draft
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
72 changes: 72 additions & 0 deletions .github/workflows/attachments-python-providers-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: Python provider attachments

# Real OpenAI, Anthropic and Groq SDKs (declared floor and latest) through the
# Python instrumentors to a TLS loopback F01 attachment server. Outbound network
# is disabled while the tests run.

on:
pull_request:
paths:
- 'python/fi_instrumentation/attachments/**'
- 'python/frameworks/openai/**'
- 'python/frameworks/anthropic/**'
- 'python/frameworks/groq/**'
- 'python/traceai/**'
- 'python/tests/attachments_providers/**'
- '.github/workflows/attachments-python-providers-tests.yml'
push:
branches: [dev]
paths:
- 'python/fi_instrumentation/attachments/**'
- 'python/frameworks/openai/**'
- 'python/frameworks/anthropic/**'
- 'python/frameworks/groq/**'
- 'python/traceai/**'
- 'python/tests/attachments_providers/**'
- '.github/workflows/attachments-python-providers-tests.yml'
workflow_dispatch:

permissions:
contents: read

jobs:
providers:
name: Provider attachments (${{ matrix.name }})
runs-on: ubuntu-24.04
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
include:
# Declared floors (pyproject.toml of each integration).
- name: floor
python: '3.10'
sdks: 'openai==1.69.0 anthropic==0.41.0 groq==0.9.0 httpx<0.28'
# Latest releases.
- name: latest
python: '3.12'
sdks: 'openai==3.49.0 anthropic==2.8.0 groq==1.7.0'
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
python-version: ${{ matrix.python }}
- name: Install source integrations and the selected SDKs
env:
SDKS: ${{ matrix.sdks }}
run: |
python -m venv .venv
# shellcheck disable=SC2086
.venv/bin/pip install -e python -e python/frameworks/openai -e python/frameworks/anthropic \
-e python/frameworks/groq opentelemetry-sdk 'pytest>=7,<9' $SDKS
.venv/bin/python -c 'import openai, anthropic, groq; print("openai", openai.__version__, "anthropic", anthropic.__version__, "groq", groq.__version__)'
- name: Run with outbound network disabled
run: |
sudo unshare --net -- bash -e -c '
ip link set lo up
cd "$2/python"
PYTHONPATH=. "$1" -m pytest tests/attachments_providers -q -p no:cacheprovider -o addopts="" \
-o faulthandler_timeout=120
' _ "$PWD/.venv/bin/python" "$PWD"
Loading
Loading