Skip to content

Commit 96cd060

Browse files
Merge branch 'master' into webb/update-tox/install-uv
2 parents 53d177e + f3a7936 commit 96cd060

49 files changed

Lines changed: 2207 additions & 683 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.claude/settings.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@
3939
"Bash(ruff format:*)",
4040
"Bash(ruff check:*)",
4141
"Bash(mypy:*)",
42-
"Bash(uv run *)"
42+
"Bash(uv run *)",
43+
"Bash(./scripts/generate-test-files.sh)"
4344
],
4445
"deny": []
4546
}

.coveragerc36

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,21 @@
33

44
[run]
55
branch = true
6+
# Match pyproject.toml so the 3.6 container's data file combines with the rest.
7+
relative_files = true
8+
disable_warnings = couldnt-parse
69
omit =
710
/tmp/*
811
*/tests/*
912
*/.venv/*
1013

1114

15+
[paths]
16+
source =
17+
sentry_sdk/
18+
*/sentry_sdk/
19+
20+
1221
[report]
1322
exclude_lines =
1423
if TYPE_CHECKING:

.github/workflows/test-integrations-agents.yml

Lines changed: 15 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,12 @@
33
# The template responsible for it is in
44
# scripts/split_tox_gh_actions/templates/base.jinja
55
name: Test Agents
6+
# Reusable workflow. It is invoked by the top-level `test.yml` orchestrator.
67
on:
7-
push:
8-
branches:
9-
- master
10-
- release/**
11-
- major/**
12-
pull_request:
13-
# Cancel in progress workflows on pull_requests.
14-
# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-a-fallback-value
15-
concurrency:
16-
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
17-
cancel-in-progress: true
8+
workflow_call:
189
permissions:
1910
contents: read
2011
actions: read
21-
pull-requests: write
22-
statuses: write
2312
jobs:
2413
test-agents:
2514
name: Agents
@@ -39,7 +28,7 @@ jobs:
3928
- name: Install uv
4029
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
4130
with:
42-
cache-suffix: ${{ github.workflow }}-${{ matrix.python-version }}
31+
enable-cache: false
4332
- name: Mark workspace safe for git (3.6/3.7 container)
4433
# needed to make git rev-parse work in the containers
4534
# subprocesses (e.g. sentry_sdk.utils.get_git_revision) can run git.
@@ -48,9 +37,6 @@ jobs:
4837
- name: Setup Test Env
4938
run: |
5039
uv sync
51-
- name: Erase coverage
52-
run: |
53-
uv run coverage erase
5440
- name: Test openai_agents
5541
run: |
5642
set -x # print commands that are executed
@@ -59,28 +45,17 @@ jobs:
5945
run: |
6046
set -x # print commands that are executed
6147
./scripts/runtox.sh "py${{ matrix.python-version }}-pydantic_ai"
62-
- name: Generate coverage XML
63-
if: ${{ !cancelled() }}
64-
run: |
65-
uv run coverage combine .coverage-sentry-*
66-
uv run coverage xml
67-
- name: Parse and Upload Coverage
48+
- name: Upload coverage data
6849
if: ${{ !cancelled() }}
69-
uses: getsentry/codecov-action@d90e69cdf071dfbb0430159125321dc09c424d4c # main
50+
continue-on-error: true
51+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
7052
with:
71-
token: ${{ secrets.GITHUB_TOKEN }}
72-
files: coverage.xml
73-
junit-xml-pattern: .junitxml
74-
base-branch: master
75-
verbose: true
76-
check_required_tests:
77-
name: All Agents tests passed
78-
needs: test-agents
79-
# Always run this, even if a dependent job failed
80-
if: always()
81-
runs-on: ubuntu-22.04
82-
steps:
83-
- name: Check for failures
84-
if: needs.test-agents.result != 'success'
85-
run: |
86-
echo "One of the dependent jobs has failed. You may need to re-run it." && exit 1
53+
name: coverage-agents-${{ matrix.python-version }}
54+
# .coverage-* / .junitxml-* are dotfiles, excluded by default
55+
include-hidden-files: true
56+
path: |
57+
.coverage-sentry-*
58+
.junitxml-*
59+
if-no-files-found: 'ignore'
60+
retention-days: 1
61+
overwrite: true

.github/workflows/test-integrations-ai-workflow.yml

Lines changed: 15 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,12 @@
33
# The template responsible for it is in
44
# scripts/split_tox_gh_actions/templates/base.jinja
55
name: Test AI Workflow
6+
# Reusable workflow. It is invoked by the top-level `test.yml` orchestrator.
67
on:
7-
push:
8-
branches:
9-
- master
10-
- release/**
11-
- major/**
12-
pull_request:
13-
# Cancel in progress workflows on pull_requests.
14-
# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-a-fallback-value
15-
concurrency:
16-
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
17-
cancel-in-progress: true
8+
workflow_call:
189
permissions:
1910
contents: read
2011
actions: read
21-
pull-requests: write
22-
statuses: write
2312
jobs:
2413
test-ai_workflow:
2514
name: AI Workflow
@@ -39,7 +28,7 @@ jobs:
3928
- name: Install uv
4029
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
4130
with:
42-
cache-suffix: ${{ github.workflow }}-${{ matrix.python-version }}
31+
enable-cache: false
4332
- name: Mark workspace safe for git (3.6/3.7 container)
4433
# needed to make git rev-parse work in the containers
4534
# subprocesses (e.g. sentry_sdk.utils.get_git_revision) can run git.
@@ -48,9 +37,6 @@ jobs:
4837
- name: Setup Test Env
4938
run: |
5039
uv sync
51-
- name: Erase coverage
52-
run: |
53-
uv run coverage erase
5440
- name: Test langchain-base
5541
run: |
5642
set -x # print commands that are executed
@@ -63,28 +49,17 @@ jobs:
6349
run: |
6450
set -x # print commands that are executed
6551
./scripts/runtox.sh "py${{ matrix.python-version }}-langgraph"
66-
- name: Generate coverage XML
67-
if: ${{ !cancelled() }}
68-
run: |
69-
uv run coverage combine .coverage-sentry-*
70-
uv run coverage xml
71-
- name: Parse and Upload Coverage
52+
- name: Upload coverage data
7253
if: ${{ !cancelled() }}
73-
uses: getsentry/codecov-action@d90e69cdf071dfbb0430159125321dc09c424d4c # main
54+
continue-on-error: true
55+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
7456
with:
75-
token: ${{ secrets.GITHUB_TOKEN }}
76-
files: coverage.xml
77-
junit-xml-pattern: .junitxml
78-
base-branch: master
79-
verbose: true
80-
check_required_tests:
81-
name: All AI Workflow tests passed
82-
needs: test-ai_workflow
83-
# Always run this, even if a dependent job failed
84-
if: always()
85-
runs-on: ubuntu-22.04
86-
steps:
87-
- name: Check for failures
88-
if: needs.test-ai_workflow.result != 'success'
89-
run: |
90-
echo "One of the dependent jobs has failed. You may need to re-run it." && exit 1
57+
name: coverage-ai_workflow-${{ matrix.python-version }}
58+
# .coverage-* / .junitxml-* are dotfiles, excluded by default
59+
include-hidden-files: true
60+
path: |
61+
.coverage-sentry-*
62+
.junitxml-*
63+
if-no-files-found: 'ignore'
64+
retention-days: 1
65+
overwrite: true

.github/workflows/test-integrations-ai.yml

Lines changed: 15 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,12 @@
33
# The template responsible for it is in
44
# scripts/split_tox_gh_actions/templates/base.jinja
55
name: Test AI
6+
# Reusable workflow. It is invoked by the top-level `test.yml` orchestrator.
67
on:
7-
push:
8-
branches:
9-
- master
10-
- release/**
11-
- major/**
12-
pull_request:
13-
# Cancel in progress workflows on pull_requests.
14-
# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-a-fallback-value
15-
concurrency:
16-
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
17-
cancel-in-progress: true
8+
workflow_call:
189
permissions:
1910
contents: read
2011
actions: read
21-
pull-requests: write
22-
statuses: write
2312
jobs:
2413
test-ai:
2514
name: AI
@@ -39,7 +28,7 @@ jobs:
3928
- name: Install uv
4029
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
4130
with:
42-
cache-suffix: ${{ github.workflow }}-${{ matrix.python-version }}
31+
enable-cache: false
4332
- name: Mark workspace safe for git (3.6/3.7 container)
4433
# needed to make git rev-parse work in the containers
4534
# subprocesses (e.g. sentry_sdk.utils.get_git_revision) can run git.
@@ -48,9 +37,6 @@ jobs:
4837
- name: Setup Test Env
4938
run: |
5039
uv sync
51-
- name: Erase coverage
52-
run: |
53-
uv run coverage erase
5440
- name: Test anthropic
5541
run: |
5642
set -x # print commands that are executed
@@ -79,28 +65,17 @@ jobs:
7965
run: |
8066
set -x # print commands that are executed
8167
./scripts/runtox.sh "py${{ matrix.python-version }}-openai-notiktoken"
82-
- name: Generate coverage XML
83-
if: ${{ !cancelled() }}
84-
run: |
85-
uv run coverage combine .coverage-sentry-*
86-
uv run coverage xml
87-
- name: Parse and Upload Coverage
68+
- name: Upload coverage data
8869
if: ${{ !cancelled() }}
89-
uses: getsentry/codecov-action@d90e69cdf071dfbb0430159125321dc09c424d4c # main
70+
continue-on-error: true
71+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
9072
with:
91-
token: ${{ secrets.GITHUB_TOKEN }}
92-
files: coverage.xml
93-
junit-xml-pattern: .junitxml
94-
base-branch: master
95-
verbose: true
96-
check_required_tests:
97-
name: All AI tests passed
98-
needs: test-ai
99-
# Always run this, even if a dependent job failed
100-
if: always()
101-
runs-on: ubuntu-22.04
102-
steps:
103-
- name: Check for failures
104-
if: needs.test-ai.result != 'success'
105-
run: |
106-
echo "One of the dependent jobs has failed. You may need to re-run it." && exit 1
73+
name: coverage-ai-${{ matrix.python-version }}
74+
# .coverage-* / .junitxml-* are dotfiles, excluded by default
75+
include-hidden-files: true
76+
path: |
77+
.coverage-sentry-*
78+
.junitxml-*
79+
if-no-files-found: 'ignore'
80+
retention-days: 1
81+
overwrite: true

.github/workflows/test-integrations-cloud.yml

Lines changed: 15 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,12 @@
33
# The template responsible for it is in
44
# scripts/split_tox_gh_actions/templates/base.jinja
55
name: Test Cloud
6+
# Reusable workflow. It is invoked by the top-level `test.yml` orchestrator.
67
on:
7-
push:
8-
branches:
9-
- master
10-
- release/**
11-
- major/**
12-
pull_request:
13-
# Cancel in progress workflows on pull_requests.
14-
# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-a-fallback-value
15-
concurrency:
16-
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
17-
cancel-in-progress: true
8+
workflow_call:
189
permissions:
1910
contents: read
2011
actions: read
21-
pull-requests: write
22-
statuses: write
2312
jobs:
2413
test-cloud:
2514
name: Cloud
@@ -43,7 +32,7 @@ jobs:
4332
- name: Install uv
4433
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
4534
with:
46-
cache-suffix: ${{ github.workflow }}-${{ matrix.python-version }}
35+
enable-cache: false
4736
- name: Mark workspace safe for git (3.6/3.7 container)
4837
# needed to make git rev-parse work in the containers
4938
# subprocesses (e.g. sentry_sdk.utils.get_git_revision) can run git.
@@ -52,9 +41,6 @@ jobs:
5241
- name: Setup Test Env
5342
run: |
5443
uv sync
55-
- name: Erase coverage
56-
run: |
57-
uv run coverage erase
5844
- name: Test aws_lambda
5945
run: |
6046
set -x # print commands that are executed
@@ -75,28 +61,17 @@ jobs:
7561
run: |
7662
set -x # print commands that are executed
7763
./scripts/runtox.sh "py${{ matrix.python-version }}-gcp"
78-
- name: Generate coverage XML
79-
if: ${{ !cancelled() }}
80-
run: |
81-
uv run coverage combine .coverage-sentry-*
82-
uv run coverage xml
83-
- name: Parse and Upload Coverage
64+
- name: Upload coverage data
8465
if: ${{ !cancelled() }}
85-
uses: getsentry/codecov-action@d90e69cdf071dfbb0430159125321dc09c424d4c # main
66+
continue-on-error: true
67+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
8668
with:
87-
token: ${{ secrets.GITHUB_TOKEN }}
88-
files: coverage.xml
89-
junit-xml-pattern: .junitxml
90-
base-branch: master
91-
verbose: true
92-
check_required_tests:
93-
name: All Cloud tests passed
94-
needs: test-cloud
95-
# Always run this, even if a dependent job failed
96-
if: always()
97-
runs-on: ubuntu-22.04
98-
steps:
99-
- name: Check for failures
100-
if: needs.test-cloud.result != 'success'
101-
run: |
102-
echo "One of the dependent jobs has failed. You may need to re-run it." && exit 1
69+
name: coverage-cloud-${{ matrix.python-version }}
70+
# .coverage-* / .junitxml-* are dotfiles, excluded by default
71+
include-hidden-files: true
72+
path: |
73+
.coverage-sentry-*
74+
.junitxml-*
75+
if-no-files-found: 'ignore'
76+
retention-days: 1
77+
overwrite: true

0 commit comments

Comments
 (0)