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
106 changes: 106 additions & 0 deletions .github/workflows/attachments-python-mcp-agents-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
name: Python MCP and agent attachments

# Real MCP, mcp-use, OpenAI Agents SDK, Claude Agent SDK, smolagents and
# firecrawl-py releases (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/mcp/**'
- 'python/frameworks/mcp-use/**'
- 'python/frameworks/openai-agents/**'
- 'python/frameworks/claude-agent-sdk/**'
- 'python/frameworks/smolagents/**'
- 'python/frameworks/firecrawl/**'
- 'python/tests/attachments_mcp_agents/**'
- 'python/tests/attachments_providers/conftest.py'
- '.github/workflows/attachments-python-mcp-agents-tests.yml'
push:
branches: [dev]
paths:
- 'python/fi_instrumentation/attachments/**'
- 'python/frameworks/mcp/**'
- 'python/frameworks/mcp-use/**'
- 'python/frameworks/openai-agents/**'
- 'python/frameworks/claude-agent-sdk/**'
- 'python/frameworks/smolagents/**'
- 'python/frameworks/firecrawl/**'
- 'python/tests/attachments_mcp_agents/**'
- 'python/tests/attachments_providers/conftest.py'
- '.github/workflows/attachments-python-mcp-agents-tests.yml'
workflow_dispatch:

permissions:
contents: read

env:
MCP_USE_ANONYMIZED_TELEMETRY: 'false'
MCP_USE_LANGFUSE: 'false'
MCP_USE_LAMINAR: 'false'

jobs:
attachments:
name: ${{ matrix.package }} attachments (${{ matrix.tier }})
runs-on: ubuntu-24.04
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
include:
- {package: core, tier: latest, python: '3.12', path: '', suite: test_tool_media.py, sdks: 'pillow'}
- {package: mcp, tier: floor, python: '3.11', path: mcp, suite: test_mcp_attachments.py, sdks: 'mcp==1.30.0'}
- {package: mcp, tier: latest, python: '3.12', path: mcp, suite: test_mcp_attachments.py, sdks: 'mcp==2.3.0'}
- {package: mcp-use, tier: floor, python: '3.11', path: mcp-use, suite: test_mcp_use_attachments.py,
sdks: 'mcp-use==1.7.1 langchain-core==1.6.12'}
- {package: mcp-use, tier: latest, python: '3.12', path: mcp-use, suite: test_mcp_use_attachments.py,
sdks: 'mcp-use==1.7.1'}
# 0.2.6 is the declared floor; computer calls get a function span from 0.10.0.
- {package: openai-agents, tier: floor, python: '3.11', path: openai-agents,
suite: test_openai_agents_attachments.py, sdks: 'openai-agents==0.2.6'}
- {package: openai-agents, tier: computer-span, python: '3.12', path: openai-agents,
suite: test_openai_agents_attachments.py, sdks: 'openai-agents==0.10.0 openai==2.19.0'}
- {package: openai-agents, tier: latest, python: '3.12', path: openai-agents,
suite: test_openai_agents_attachments.py, sdks: 'openai-agents==0.24.0'}
- {package: claude-agent-sdk, tier: floor, python: '3.11', path: claude-agent-sdk,
suite: test_claude_agent_sdk_attachments.py, sdks: 'claude-agent-sdk==0.1.0'}
- {package: claude-agent-sdk, tier: latest, python: '3.12', path: claude-agent-sdk,
suite: test_claude_agent_sdk_attachments.py, sdks: 'claude-agent-sdk==0.2.180'}
- {package: smolagents, tier: floor, python: '3.11', path: smolagents, suite: test_smolagents_attachments.py,
sdks: 'smolagents==1.12.0 openai'}
- {package: smolagents, tier: latest, python: '3.12', path: smolagents, suite: test_smolagents_attachments.py,
sdks: 'smolagents==1.26.0 openai'}
- {package: firecrawl, tier: floor, python: '3.11', path: firecrawl, suite: test_firecrawl_attachments.py,
sdks: 'firecrawl-py==4.46.2'}
- {package: firecrawl, tier: latest, python: '3.12', path: firecrawl, suite: test_firecrawl_attachments.py,
sdks: 'firecrawl-py==4.55.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 the source integration and the selected SDK
env:
SDKS: ${{ matrix.sdks }}
PKG_PATH: ${{ matrix.path }}
run: |
python -m venv .venv
extra=""
if [ -n "$PKG_PATH" ]; then extra="-e python/frameworks/$PKG_PATH"; fi
# shellcheck disable=SC2086
.venv/bin/pip install -e python $extra opentelemetry-sdk 'pytest>=8,<9' 'pytest-asyncio<0.25' packaging $SDKS
.venv/bin/pip freeze | grep -iE '^(mcp|mcp-use|openai-agents|openai|claude-agent-sdk|smolagents|firecrawl-py|pillow|langchain-core)==' || true
- name: Run with outbound network disabled
env:
SUITE: ${{ matrix.suite }}
run: |
sudo --preserve-env=MCP_USE_ANONYMIZED_TELEMETRY,MCP_USE_LANGFUSE,MCP_USE_LAMINAR unshare --net -- bash -e -c '
ip link set lo up
cd "$2/python"
PYTHONPATH=. "$1" -m pytest "tests/attachments_mcp_agents/$3" -q -p no:cacheprovider -o addopts="" \
-o faulthandler_timeout=120
' _ "$PWD/.venv/bin/python" "$PWD" "$SUITE"
Loading
Loading