Skip to content
Open
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
3 changes: 2 additions & 1 deletion .claude/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@
"Bash(ruff format:*)",
"Bash(ruff check:*)",
"Bash(mypy:*)",
"Bash(uv run *)"
"Bash(uv run *)",
"Bash(./scripts/generate-test-files.sh)"
],
"deny": []
}
Expand Down
9 changes: 9 additions & 0 deletions .coveragerc36
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,21 @@

[run]
branch = true
# Match pyproject.toml so the 3.6 container's data file combines with the rest.
relative_files = true
disable_warnings = couldnt-parse
omit =
/tmp/*
*/tests/*
*/.venv/*


[paths]
source =
sentry_sdk/
*/sentry_sdk/


[report]
exclude_lines =
if TYPE_CHECKING:
55 changes: 15 additions & 40 deletions .github/workflows/test-integrations-agents.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,12 @@
# The template responsible for it is in
# scripts/split_tox_gh_actions/templates/base.jinja
name: Test Agents
# Reusable workflow. It is invoked by the top-level `test.yml` orchestrator.
on:
push:
branches:
- master
- release/**
- major/**
pull_request:
# Cancel in progress workflows on pull_requests.
# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-a-fallback-value
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
workflow_call:
permissions:
contents: read
actions: read
pull-requests: write
statuses: write
jobs:
test-agents:
name: Agents
Expand All @@ -39,7 +28,8 @@ jobs:
- name: Install uv
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
with:
cache-suffix: ${{ github.workflow }}-${{ matrix.python-version }}
cache-suffix: agents-${{ matrix.python-version }}
enable-cache: ${{ matrix.python-version != '3.6' && matrix.python-version != '3.7' }}
- name: Mark workspace safe for git (3.6/3.7 container)
# needed to make git rev-parse work in the containers
# subprocesses (e.g. sentry_sdk.utils.get_git_revision) can run git.
Expand All @@ -48,9 +38,6 @@ jobs:
- name: Setup Test Env
run: |
uv sync
- name: Erase coverage
run: |
uv run coverage erase
- name: Test openai_agents
run: |
set -x # print commands that are executed
Expand All @@ -59,28 +46,16 @@ jobs:
run: |
set -x # print commands that are executed
./scripts/runtox.sh "py${{ matrix.python-version }}-pydantic_ai"
- name: Generate coverage XML
if: ${{ !cancelled() }}
run: |
uv run coverage combine .coverage-sentry-*
uv run coverage xml
- name: Parse and Upload Coverage
- name: Upload coverage data
if: ${{ !cancelled() }}
uses: getsentry/codecov-action@d90e69cdf071dfbb0430159125321dc09c424d4c # main
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
token: ${{ secrets.GITHUB_TOKEN }}
files: coverage.xml
junit-xml-pattern: .junitxml
base-branch: master
verbose: true
check_required_tests:
name: All Agents tests passed
needs: test-agents
# Always run this, even if a dependent job failed
if: always()
runs-on: ubuntu-22.04
steps:
- name: Check for failures
if: needs.test-agents.result != 'success'
run: |
echo "One of the dependent jobs has failed. You may need to re-run it." && exit 1
name: coverage-agents-${{ matrix.python-version }}
# .coverage-* / .junitxml-* are dotfiles, excluded by default
include-hidden-files: true
path: |
.coverage-sentry-*
.junitxml-*
if-no-files-found: 'ignore'
retention-days: 1
overwrite: true
55 changes: 15 additions & 40 deletions .github/workflows/test-integrations-ai-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,12 @@
# The template responsible for it is in
# scripts/split_tox_gh_actions/templates/base.jinja
name: Test AI Workflow
# Reusable workflow. It is invoked by the top-level `test.yml` orchestrator.
on:
push:
branches:
- master
- release/**
- major/**
pull_request:
# Cancel in progress workflows on pull_requests.
# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-a-fallback-value
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
workflow_call:
permissions:
contents: read
actions: read
pull-requests: write
statuses: write
jobs:
test-ai_workflow:
name: AI Workflow
Expand All @@ -39,7 +28,8 @@ jobs:
- name: Install uv
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
with:
cache-suffix: ${{ github.workflow }}-${{ matrix.python-version }}
cache-suffix: ai_workflow-${{ matrix.python-version }}
enable-cache: ${{ matrix.python-version != '3.6' && matrix.python-version != '3.7' }}
- name: Mark workspace safe for git (3.6/3.7 container)
# needed to make git rev-parse work in the containers
# subprocesses (e.g. sentry_sdk.utils.get_git_revision) can run git.
Expand All @@ -48,9 +38,6 @@ jobs:
- name: Setup Test Env
run: |
uv sync
- name: Erase coverage
run: |
uv run coverage erase
- name: Test langchain-base
run: |
set -x # print commands that are executed
Expand All @@ -63,28 +50,16 @@ jobs:
run: |
set -x # print commands that are executed
./scripts/runtox.sh "py${{ matrix.python-version }}-langgraph"
- name: Generate coverage XML
if: ${{ !cancelled() }}
run: |
uv run coverage combine .coverage-sentry-*
uv run coverage xml
- name: Parse and Upload Coverage
- name: Upload coverage data
if: ${{ !cancelled() }}
uses: getsentry/codecov-action@d90e69cdf071dfbb0430159125321dc09c424d4c # main
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
token: ${{ secrets.GITHUB_TOKEN }}
files: coverage.xml
junit-xml-pattern: .junitxml
base-branch: master
verbose: true
check_required_tests:
name: All AI Workflow tests passed
needs: test-ai_workflow
# Always run this, even if a dependent job failed
if: always()
runs-on: ubuntu-22.04
steps:
- name: Check for failures
if: needs.test-ai_workflow.result != 'success'
run: |
echo "One of the dependent jobs has failed. You may need to re-run it." && exit 1
name: coverage-ai_workflow-${{ matrix.python-version }}
# .coverage-* / .junitxml-* are dotfiles, excluded by default
include-hidden-files: true
path: |
.coverage-sentry-*
.junitxml-*
if-no-files-found: 'ignore'
retention-days: 1
overwrite: true
55 changes: 15 additions & 40 deletions .github/workflows/test-integrations-ai.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,12 @@
# The template responsible for it is in
# scripts/split_tox_gh_actions/templates/base.jinja
name: Test AI
# Reusable workflow. It is invoked by the top-level `test.yml` orchestrator.
on:
push:
branches:
- master
- release/**
- major/**
pull_request:
# Cancel in progress workflows on pull_requests.
# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-a-fallback-value
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
workflow_call:
permissions:
contents: read
actions: read
pull-requests: write
statuses: write
jobs:
test-ai:
name: AI
Expand All @@ -39,7 +28,8 @@ jobs:
- name: Install uv
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
with:
cache-suffix: ${{ github.workflow }}-${{ matrix.python-version }}
cache-suffix: ai-${{ matrix.python-version }}
enable-cache: ${{ matrix.python-version != '3.6' && matrix.python-version != '3.7' }}
- name: Mark workspace safe for git (3.6/3.7 container)
# needed to make git rev-parse work in the containers
# subprocesses (e.g. sentry_sdk.utils.get_git_revision) can run git.
Expand All @@ -48,9 +38,6 @@ jobs:
- name: Setup Test Env
run: |
uv sync
- name: Erase coverage
run: |
uv run coverage erase
- name: Test anthropic
run: |
set -x # print commands that are executed
Expand Down Expand Up @@ -79,28 +66,16 @@ jobs:
run: |
set -x # print commands that are executed
./scripts/runtox.sh "py${{ matrix.python-version }}-openai-notiktoken"
- name: Generate coverage XML
if: ${{ !cancelled() }}
run: |
uv run coverage combine .coverage-sentry-*
uv run coverage xml
- name: Parse and Upload Coverage
- name: Upload coverage data
if: ${{ !cancelled() }}
uses: getsentry/codecov-action@d90e69cdf071dfbb0430159125321dc09c424d4c # main
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
token: ${{ secrets.GITHUB_TOKEN }}
files: coverage.xml
junit-xml-pattern: .junitxml
base-branch: master
verbose: true
check_required_tests:
name: All AI tests passed
needs: test-ai
# Always run this, even if a dependent job failed
if: always()
runs-on: ubuntu-22.04
steps:
- name: Check for failures
if: needs.test-ai.result != 'success'
run: |
echo "One of the dependent jobs has failed. You may need to re-run it." && exit 1
name: coverage-ai-${{ matrix.python-version }}
# .coverage-* / .junitxml-* are dotfiles, excluded by default
include-hidden-files: true
path: |
.coverage-sentry-*
.junitxml-*
if-no-files-found: 'ignore'
retention-days: 1
overwrite: true
55 changes: 15 additions & 40 deletions .github/workflows/test-integrations-cloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,12 @@
# The template responsible for it is in
# scripts/split_tox_gh_actions/templates/base.jinja
name: Test Cloud
# Reusable workflow. It is invoked by the top-level `test.yml` orchestrator.
on:
push:
branches:
- master
- release/**
- major/**
pull_request:
# Cancel in progress workflows on pull_requests.
# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-a-fallback-value
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
workflow_call:
permissions:
contents: read
actions: read
pull-requests: write
statuses: write
jobs:
test-cloud:
name: Cloud
Expand All @@ -43,7 +32,8 @@ jobs:
- name: Install uv
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
with:
cache-suffix: ${{ github.workflow }}-${{ matrix.python-version }}
cache-suffix: cloud-${{ matrix.python-version }}
enable-cache: ${{ matrix.python-version != '3.6' && matrix.python-version != '3.7' }}
- name: Mark workspace safe for git (3.6/3.7 container)
# needed to make git rev-parse work in the containers
# subprocesses (e.g. sentry_sdk.utils.get_git_revision) can run git.
Expand All @@ -52,9 +42,6 @@ jobs:
- name: Setup Test Env
run: |
uv sync
- name: Erase coverage
run: |
uv run coverage erase
- name: Test aws_lambda
run: |
set -x # print commands that are executed
Expand All @@ -75,28 +62,16 @@ jobs:
run: |
set -x # print commands that are executed
./scripts/runtox.sh "py${{ matrix.python-version }}-gcp"
- name: Generate coverage XML
if: ${{ !cancelled() }}
run: |
uv run coverage combine .coverage-sentry-*
uv run coverage xml
- name: Parse and Upload Coverage
- name: Upload coverage data
if: ${{ !cancelled() }}
uses: getsentry/codecov-action@d90e69cdf071dfbb0430159125321dc09c424d4c # main
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
token: ${{ secrets.GITHUB_TOKEN }}
files: coverage.xml
junit-xml-pattern: .junitxml
base-branch: master
verbose: true
check_required_tests:
name: All Cloud tests passed
needs: test-cloud
# Always run this, even if a dependent job failed
if: always()
runs-on: ubuntu-22.04
steps:
- name: Check for failures
if: needs.test-cloud.result != 'success'
run: |
echo "One of the dependent jobs has failed. You may need to re-run it." && exit 1
name: coverage-cloud-${{ matrix.python-version }}
# .coverage-* / .junitxml-* are dotfiles, excluded by default
include-hidden-files: true
path: |
.coverage-sentry-*
.junitxml-*
if-no-files-found: 'ignore'
retention-days: 1
overwrite: true
Loading
Loading