Skip to content

Commit 7a3ab15

Browse files
authoredJun 25, 2024··
Update our Codecov setup (#3190)
This PR: - Cleans up our pytest configuration and moves everything into pytest.ini - Make our Codecov setup more valuable. If there is now a test failing we get a comment in the PR showing the failing test and its output.
1 parent ac5c8e8 commit 7a3ab15

16 files changed

+314
-129
lines changed
 

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

+28-12
Original file line numberDiff line numberDiff line change
@@ -45,31 +45,39 @@ jobs:
4545
- name: Test anthropic latest
4646
run: |
4747
set -x # print commands that are executed
48-
./scripts/runtox.sh "py${{ matrix.python-version }}-anthropic-latest" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
48+
./scripts/runtox.sh "py${{ matrix.python-version }}-anthropic-latest"
4949
- name: Test cohere latest
5050
run: |
5151
set -x # print commands that are executed
52-
./scripts/runtox.sh "py${{ matrix.python-version }}-cohere-latest" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
52+
./scripts/runtox.sh "py${{ matrix.python-version }}-cohere-latest"
5353
- name: Test langchain latest
5454
run: |
5555
set -x # print commands that are executed
56-
./scripts/runtox.sh "py${{ matrix.python-version }}-langchain-latest" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
56+
./scripts/runtox.sh "py${{ matrix.python-version }}-langchain-latest"
5757
- name: Test openai latest
5858
run: |
5959
set -x # print commands that are executed
60-
./scripts/runtox.sh "py${{ matrix.python-version }}-openai-latest" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
60+
./scripts/runtox.sh "py${{ matrix.python-version }}-openai-latest"
6161
- name: Test huggingface_hub latest
6262
run: |
6363
set -x # print commands that are executed
64-
./scripts/runtox.sh "py${{ matrix.python-version }}-huggingface_hub-latest" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
64+
./scripts/runtox.sh "py${{ matrix.python-version }}-huggingface_hub-latest"
6565
- name: Generate coverage XML
66+
if: ${{ !cancelled() }}
6667
run: |
6768
coverage combine .coverage*
6869
coverage xml -i
69-
- uses: codecov/codecov-action@v4
70+
- name: Upload coverage to Codecov
71+
if: ${{ !cancelled() }}
72+
uses: codecov/codecov-action@v4.5.0
7073
with:
7174
token: ${{ secrets.CODECOV_TOKEN }}
7275
files: coverage.xml
76+
- name: Upload test results to Codecov
77+
if: ${{ !cancelled() }}
78+
uses: codecov/test-results-action@v1
79+
with:
80+
token: ${{ secrets.CODECOV_TOKEN }}
7381
test-ai-pinned:
7482
name: AI (pinned)
7583
timeout-minutes: 30
@@ -97,31 +105,39 @@ jobs:
97105
- name: Test anthropic pinned
98106
run: |
99107
set -x # print commands that are executed
100-
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-anthropic" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
108+
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-anthropic"
101109
- name: Test cohere pinned
102110
run: |
103111
set -x # print commands that are executed
104-
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-cohere" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
112+
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-cohere"
105113
- name: Test langchain pinned
106114
run: |
107115
set -x # print commands that are executed
108-
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-langchain" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
116+
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-langchain"
109117
- name: Test openai pinned
110118
run: |
111119
set -x # print commands that are executed
112-
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-openai" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
120+
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-openai"
113121
- name: Test huggingface_hub pinned
114122
run: |
115123
set -x # print commands that are executed
116-
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-huggingface_hub" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
124+
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-huggingface_hub"
117125
- name: Generate coverage XML
126+
if: ${{ !cancelled() }}
118127
run: |
119128
coverage combine .coverage*
120129
coverage xml -i
121-
- uses: codecov/codecov-action@v4
130+
- name: Upload coverage to Codecov
131+
if: ${{ !cancelled() }}
132+
uses: codecov/codecov-action@v4.5.0
122133
with:
123134
token: ${{ secrets.CODECOV_TOKEN }}
124135
files: coverage.xml
136+
- name: Upload test results to Codecov
137+
if: ${{ !cancelled() }}
138+
uses: codecov/test-results-action@v1
139+
with:
140+
token: ${{ secrets.CODECOV_TOKEN }}
125141
check_required_tests:
126142
name: All AI tests passed
127143
needs: test-ai-pinned

‎.github/workflows/test-integrations-aws-lambda.yml

+10-2
Original file line numberDiff line numberDiff line change
@@ -80,15 +80,23 @@ jobs:
8080
- name: Test aws_lambda pinned
8181
run: |
8282
set -x # print commands that are executed
83-
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-aws_lambda" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
83+
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-aws_lambda"
8484
- name: Generate coverage XML
85+
if: ${{ !cancelled() }}
8586
run: |
8687
coverage combine .coverage*
8788
coverage xml -i
88-
- uses: codecov/codecov-action@v4
89+
- name: Upload coverage to Codecov
90+
if: ${{ !cancelled() }}
91+
uses: codecov/codecov-action@v4.5.0
8992
with:
9093
token: ${{ secrets.CODECOV_TOKEN }}
9194
files: coverage.xml
95+
- name: Upload test results to Codecov
96+
if: ${{ !cancelled() }}
97+
uses: codecov/test-results-action@v1
98+
with:
99+
token: ${{ secrets.CODECOV_TOKEN }}
92100
check_required_tests:
93101
name: All AWS Lambda tests passed
94102
needs: test-aws_lambda-pinned

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

+26-10
Original file line numberDiff line numberDiff line change
@@ -45,27 +45,35 @@ jobs:
4545
- name: Test boto3 latest
4646
run: |
4747
set -x # print commands that are executed
48-
./scripts/runtox.sh "py${{ matrix.python-version }}-boto3-latest" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
48+
./scripts/runtox.sh "py${{ matrix.python-version }}-boto3-latest"
4949
- name: Test chalice latest
5050
run: |
5151
set -x # print commands that are executed
52-
./scripts/runtox.sh "py${{ matrix.python-version }}-chalice-latest" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
52+
./scripts/runtox.sh "py${{ matrix.python-version }}-chalice-latest"
5353
- name: Test cloud_resource_context latest
5454
run: |
5555
set -x # print commands that are executed
56-
./scripts/runtox.sh "py${{ matrix.python-version }}-cloud_resource_context-latest" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
56+
./scripts/runtox.sh "py${{ matrix.python-version }}-cloud_resource_context-latest"
5757
- name: Test gcp latest
5858
run: |
5959
set -x # print commands that are executed
60-
./scripts/runtox.sh "py${{ matrix.python-version }}-gcp-latest" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
60+
./scripts/runtox.sh "py${{ matrix.python-version }}-gcp-latest"
6161
- name: Generate coverage XML
62+
if: ${{ !cancelled() }}
6263
run: |
6364
coverage combine .coverage*
6465
coverage xml -i
65-
- uses: codecov/codecov-action@v4
66+
- name: Upload coverage to Codecov
67+
if: ${{ !cancelled() }}
68+
uses: codecov/codecov-action@v4.5.0
6669
with:
6770
token: ${{ secrets.CODECOV_TOKEN }}
6871
files: coverage.xml
72+
- name: Upload test results to Codecov
73+
if: ${{ !cancelled() }}
74+
uses: codecov/test-results-action@v1
75+
with:
76+
token: ${{ secrets.CODECOV_TOKEN }}
6977
test-cloud_computing-pinned:
7078
name: Cloud Computing (pinned)
7179
timeout-minutes: 30
@@ -93,27 +101,35 @@ jobs:
93101
- name: Test boto3 pinned
94102
run: |
95103
set -x # print commands that are executed
96-
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-boto3" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
104+
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-boto3"
97105
- name: Test chalice pinned
98106
run: |
99107
set -x # print commands that are executed
100-
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-chalice" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
108+
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-chalice"
101109
- name: Test cloud_resource_context pinned
102110
run: |
103111
set -x # print commands that are executed
104-
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-cloud_resource_context" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
112+
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-cloud_resource_context"
105113
- name: Test gcp pinned
106114
run: |
107115
set -x # print commands that are executed
108-
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-gcp" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
116+
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-gcp"
109117
- name: Generate coverage XML
118+
if: ${{ !cancelled() }}
110119
run: |
111120
coverage combine .coverage*
112121
coverage xml -i
113-
- uses: codecov/codecov-action@v4
122+
- name: Upload coverage to Codecov
123+
if: ${{ !cancelled() }}
124+
uses: codecov/codecov-action@v4.5.0
114125
with:
115126
token: ${{ secrets.CODECOV_TOKEN }}
116127
files: coverage.xml
128+
- name: Upload test results to Codecov
129+
if: ${{ !cancelled() }}
130+
uses: codecov/test-results-action@v1
131+
with:
132+
token: ${{ secrets.CODECOV_TOKEN }}
117133
check_required_tests:
118134
name: All Cloud Computing tests passed
119135
needs: test-cloud_computing-pinned

‎.github/workflows/test-integrations-common.yml

+10-2
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,23 @@ jobs:
4545
- name: Test common pinned
4646
run: |
4747
set -x # print commands that are executed
48-
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-common" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
48+
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-common"
4949
- name: Generate coverage XML
50+
if: ${{ !cancelled() }}
5051
run: |
5152
coverage combine .coverage*
5253
coverage xml -i
53-
- uses: codecov/codecov-action@v4
54+
- name: Upload coverage to Codecov
55+
if: ${{ !cancelled() }}
56+
uses: codecov/codecov-action@v4.5.0
5457
with:
5558
token: ${{ secrets.CODECOV_TOKEN }}
5659
files: coverage.xml
60+
- name: Upload test results to Codecov
61+
if: ${{ !cancelled() }}
62+
uses: codecov/test-results-action@v1
63+
with:
64+
token: ${{ secrets.CODECOV_TOKEN }}
5765
check_required_tests:
5866
name: All Common tests passed
5967
needs: test-common-pinned

‎.github/workflows/test-integrations-data-processing.yml

+30-14
Original file line numberDiff line numberDiff line change
@@ -47,35 +47,43 @@ jobs:
4747
- name: Test arq latest
4848
run: |
4949
set -x # print commands that are executed
50-
./scripts/runtox.sh "py${{ matrix.python-version }}-arq-latest" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
50+
./scripts/runtox.sh "py${{ matrix.python-version }}-arq-latest"
5151
- name: Test beam latest
5252
run: |
5353
set -x # print commands that are executed
54-
./scripts/runtox.sh "py${{ matrix.python-version }}-beam-latest" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
54+
./scripts/runtox.sh "py${{ matrix.python-version }}-beam-latest"
5555
- name: Test celery latest
5656
run: |
5757
set -x # print commands that are executed
58-
./scripts/runtox.sh "py${{ matrix.python-version }}-celery-latest" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
58+
./scripts/runtox.sh "py${{ matrix.python-version }}-celery-latest"
5959
- name: Test huey latest
6060
run: |
6161
set -x # print commands that are executed
62-
./scripts/runtox.sh "py${{ matrix.python-version }}-huey-latest" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
62+
./scripts/runtox.sh "py${{ matrix.python-version }}-huey-latest"
6363
- name: Test rq latest
6464
run: |
6565
set -x # print commands that are executed
66-
./scripts/runtox.sh "py${{ matrix.python-version }}-rq-latest" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
66+
./scripts/runtox.sh "py${{ matrix.python-version }}-rq-latest"
6767
- name: Test spark latest
6868
run: |
6969
set -x # print commands that are executed
70-
./scripts/runtox.sh "py${{ matrix.python-version }}-spark-latest" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
70+
./scripts/runtox.sh "py${{ matrix.python-version }}-spark-latest"
7171
- name: Generate coverage XML
72+
if: ${{ !cancelled() }}
7273
run: |
7374
coverage combine .coverage*
7475
coverage xml -i
75-
- uses: codecov/codecov-action@v4
76+
- name: Upload coverage to Codecov
77+
if: ${{ !cancelled() }}
78+
uses: codecov/codecov-action@v4.5.0
7679
with:
7780
token: ${{ secrets.CODECOV_TOKEN }}
7881
files: coverage.xml
82+
- name: Upload test results to Codecov
83+
if: ${{ !cancelled() }}
84+
uses: codecov/test-results-action@v1
85+
with:
86+
token: ${{ secrets.CODECOV_TOKEN }}
7987
test-data_processing-pinned:
8088
name: Data Processing (pinned)
8189
timeout-minutes: 30
@@ -105,35 +113,43 @@ jobs:
105113
- name: Test arq pinned
106114
run: |
107115
set -x # print commands that are executed
108-
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-arq" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
116+
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-arq"
109117
- name: Test beam pinned
110118
run: |
111119
set -x # print commands that are executed
112-
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-beam" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
120+
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-beam"
113121
- name: Test celery pinned
114122
run: |
115123
set -x # print commands that are executed
116-
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-celery" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
124+
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-celery"
117125
- name: Test huey pinned
118126
run: |
119127
set -x # print commands that are executed
120-
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-huey" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
128+
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-huey"
121129
- name: Test rq pinned
122130
run: |
123131
set -x # print commands that are executed
124-
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-rq" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
132+
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-rq"
125133
- name: Test spark pinned
126134
run: |
127135
set -x # print commands that are executed
128-
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-spark" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
136+
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-spark"
129137
- name: Generate coverage XML
138+
if: ${{ !cancelled() }}
130139
run: |
131140
coverage combine .coverage*
132141
coverage xml -i
133-
- uses: codecov/codecov-action@v4
142+
- name: Upload coverage to Codecov
143+
if: ${{ !cancelled() }}
144+
uses: codecov/codecov-action@v4.5.0
134145
with:
135146
token: ${{ secrets.CODECOV_TOKEN }}
136147
files: coverage.xml
148+
- name: Upload test results to Codecov
149+
if: ${{ !cancelled() }}
150+
uses: codecov/test-results-action@v1
151+
with:
152+
token: ${{ secrets.CODECOV_TOKEN }}
137153
check_required_tests:
138154
name: All Data Processing tests passed
139155
needs: test-data_processing-pinned

0 commit comments

Comments
 (0)
Please sign in to comment.