Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use uv for running tests #2943

Draft
wants to merge 73 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
79855af
Remove outdated pins
sentrivana Jan 30, 2024
fd3ed36
Remove more pins
sentrivana Jan 30, 2024
4a0b04e
more pins
sentrivana Jan 30, 2024
9c4c48a
remove all the pins!
sentrivana Jan 30, 2024
0f72223
ok not all at once
sentrivana Jan 30, 2024
5427ea3
lets start with tox
sentrivana Jan 30, 2024
336f260
ok not touching tox yet
sentrivana Jan 30, 2024
9d9898f
drop jsonschema pin
sentrivana Feb 6, 2024
050f97b
bisecting..
sentrivana Feb 6, 2024
2c49a75
Merge branch 'sentry-sdk-2.0' into ivana/2.0/update-tooling
sentrivana Feb 6, 2024
6e9c8bf
fix new beam
sentrivana Feb 6, 2024
7d64ad1
remove pin on pytest-cov
sentrivana Feb 6, 2024
b99c876
tox step by step
sentrivana Feb 6, 2024
1c2700c
pytest deprecation
sentrivana Feb 6, 2024
6659e97
no distutils on 3.12
sentrivana Feb 6, 2024
0953fa7
add setuptools, fix pytest for redis
sentrivana Feb 6, 2024
cc15653
Merge branch 'sentry-sdk-2.0' into ivana/2.0/update-tooling
sentrivana Feb 6, 2024
66d46d5
again
sentrivana Feb 6, 2024
f3fed12
?
sentrivana Feb 6, 2024
c69ae05
Merge branch 'sentry-sdk-2.0' into ivana/2.0/update-tooling
sentrivana Apr 3, 2024
56cc583
compat import not needed anymore
sentrivana Apr 3, 2024
214b210
is it tox?
sentrivana Apr 3, 2024
87f6118
is it tox<4?
sentrivana Apr 3, 2024
b713450
is it tox 4?
sentrivana Apr 3, 2024
e26b1c2
tox 4.0.19?
sentrivana Apr 3, 2024
0d0b5dc
sad
sentrivana Apr 3, 2024
6ac9dc0
add comment
sentrivana Apr 3, 2024
a1eaf1d
formatting
sentrivana Apr 4, 2024
f0989b8
trying somethin
sentrivana Apr 4, 2024
b6b8627
wip
sentrivana Apr 4, 2024
07549e9
wip
sentrivana Apr 4, 2024
dc8dc52
change tox pin in ci yamls
sentrivana Apr 4, 2024
62a2366
return the fork
sentrivana Apr 4, 2024
affe24b
remove dependabot ignores
sentrivana Apr 4, 2024
0f60c5b
trying somethin
sentrivana Apr 4, 2024
d49324e
wip
sentrivana Apr 4, 2024
8d8e12a
try bumping protobuf types
sentrivana Apr 4, 2024
59401e5
make tox verbose again
sentrivana Apr 5, 2024
e81c1e9
trying something
sentrivana Apr 5, 2024
5d3f511
another attempt
sentrivana Apr 5, 2024
0f146ad
?
sentrivana Apr 5, 2024
db5e3f1
revert
sentrivana Apr 5, 2024
63bf914
is this coming from elsewhere?
sentrivana Apr 5, 2024
3e02bdf
trying somethin
sentrivana Apr 5, 2024
4a6e197
?
sentrivana Apr 5, 2024
f1117bc
revert
sentrivana Apr 5, 2024
43c0176
more revert
sentrivana Apr 5, 2024
c9f035f
try reuse-db again
sentrivana Apr 5, 2024
d5ec5f4
?
sentrivana Apr 5, 2024
9e2202c
?
sentrivana Apr 5, 2024
1e36124
revert
sentrivana Apr 5, 2024
123192d
see pytest output?
sentrivana Apr 5, 2024
2d141e1
more pytest capturing
sentrivana Apr 5, 2024
87004c7
more pytest stuff
sentrivana Apr 5, 2024
1a86013
wip
sentrivana Apr 5, 2024
06167b6
sanity check
sentrivana Apr 5, 2024
0bbac1d
apparently it isnt tox
sentrivana Apr 5, 2024
2ad0068
Run tests in new tooling (#2938)
antonpirker Apr 8, 2024
bf65327
another sanity check
sentrivana Apr 8, 2024
e1f2ec1
?
sentrivana Apr 8, 2024
46c5438
verbosity
sentrivana Apr 8, 2024
f89432a
remove tox from test-requirements
sentrivana Apr 8, 2024
7571be8
ok this is too much
sentrivana Apr 8, 2024
c89482e
Trying uv in makefile
antonpirker Apr 8, 2024
bbc69aa
Using uv in github actions
antonpirker Apr 8, 2024
8af2d85
Virtualenv everywhere
antonpirker Apr 8, 2024
793551a
apidocs
antonpirker Apr 8, 2024
52f6db1
Erase coverage in setup step (does not make sense to have separate st…
antonpirker Apr 8, 2024
8ab2b5d
use virtualenv when generating coverage file
antonpirker Apr 8, 2024
e1b7648
More uv in tox
antonpirker Apr 8, 2024
421df18
debug output
antonpirker Apr 8, 2024
54712a4
debug output
antonpirker Apr 8, 2024
b8f8242
debug output
antonpirker Apr 8, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
18 changes: 0 additions & 18 deletions .github/dependabot.yml
Expand Up @@ -9,27 +9,9 @@ updates:
- dependency-type: direct
- dependency-type: indirect
ignore:
- dependency-name: pytest
versions:
- "> 3.7.3"
- dependency-name: flake8 # Later versions dropped Python 2 support
versions:
- "> 5.0.4"
- dependency-name: jsonschema # Later versions dropped Python 2 support
versions:
- "> 3.2.0"
- dependency-name: pytest-cov
versions:
- "> 2.8.1"
- dependency-name: pytest-forked
versions:
- "> 1.1.3"
- dependency-name: sphinx
versions:
- ">= 2.4.a, < 2.5"
- dependency-name: tox
versions:
- "> 3.7.0"
- dependency-name: werkzeug
versions:
- "> 0.15.5, < 1"
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/ci.yml
Expand Up @@ -30,7 +30,7 @@ jobs:
python-version: 3.12

- run: |
pip install tox
pip install tox tox-uv
tox -e linters

check-ci-config:
Expand All @@ -45,7 +45,10 @@ jobs:
python-version: 3.12

- run: |
pip install jinja2
pip install uv
uv venv
. .venv/bin/activate
uv pip install jinja2
python scripts/split-tox-gh-actions/split-tox-gh-actions.py --fail-on-changes

build_lambda_layer:
Expand All @@ -67,7 +70,6 @@ jobs:
- name: Build Packages
run: |
echo "Creating directory containing Python SDK Lambda Layer"
pip install virtualenv
# This will also trigger "make dist" that creates the Python packages
make aws-lambda-layer
- name: Upload Python Packages
Expand All @@ -89,7 +91,6 @@ jobs:
python-version: 3.12

- run: |
pip install virtualenv
make apidocs
cd docs/_build && zip -r gh-pages ./

Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/test-integrations-aws-lambda.yml
Expand Up @@ -73,16 +73,19 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Setup Test Env
run: |
pip install coverage "tox>=3,<4"
- name: Erase coverage
run: |
pip install uv
uv venv
. .venv/bin/activate
uv pip install coverage tox tox-uv
coverage erase
- name: Test aws_lambda pinned
run: |
set -x # print commands that are executed
. .venv/bin/activate
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-aws_lambda" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
- name: Generate coverage XML
run: |
. .venv/bin/activate
coverage combine .coverage*
coverage xml -i
- uses: codecov/codecov-action@v4
Expand Down
24 changes: 18 additions & 6 deletions .github/workflows/test-integrations-cloud-computing.yml
Expand Up @@ -38,28 +38,34 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Setup Test Env
run: |
pip install coverage "tox>=3,<4"
- name: Erase coverage
run: |
pip install uv
uv venv
. .venv/bin/activate
uv pip install coverage tox tox-uv
coverage erase
- name: Test boto3 latest
run: |
set -x # print commands that are executed
. .venv/bin/activate
./scripts/runtox.sh "py${{ matrix.python-version }}-boto3-latest" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
- name: Test chalice latest
run: |
set -x # print commands that are executed
. .venv/bin/activate
./scripts/runtox.sh "py${{ matrix.python-version }}-chalice-latest" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
- name: Test cloud_resource_context latest
run: |
set -x # print commands that are executed
. .venv/bin/activate
./scripts/runtox.sh "py${{ matrix.python-version }}-cloud_resource_context-latest" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
- name: Test gcp latest
run: |
set -x # print commands that are executed
. .venv/bin/activate
./scripts/runtox.sh "py${{ matrix.python-version }}-gcp-latest" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
- name: Generate coverage XML
run: |
. .venv/bin/activate
coverage combine .coverage*
coverage xml -i
- uses: codecov/codecov-action@v4
Expand All @@ -86,28 +92,34 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Setup Test Env
run: |
pip install coverage "tox>=3,<4"
- name: Erase coverage
run: |
pip install uv
uv venv
. .venv/bin/activate
uv pip install coverage tox tox-uv
coverage erase
- name: Test boto3 pinned
run: |
set -x # print commands that are executed
. .venv/bin/activate
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-boto3" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
- name: Test chalice pinned
run: |
set -x # print commands that are executed
. .venv/bin/activate
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-chalice" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
- name: Test cloud_resource_context pinned
run: |
set -x # print commands that are executed
. .venv/bin/activate
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-cloud_resource_context" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
- name: Test gcp pinned
run: |
set -x # print commands that are executed
. .venv/bin/activate
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-gcp" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
- name: Generate coverage XML
run: |
. .venv/bin/activate
coverage combine .coverage*
coverage xml -i
- uses: codecov/codecov-action@v4
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/test-integrations-common.yml
Expand Up @@ -38,16 +38,19 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Setup Test Env
run: |
pip install coverage "tox>=3,<4"
- name: Erase coverage
run: |
pip install uv
uv venv
. .venv/bin/activate
uv pip install coverage tox tox-uv
coverage erase
- name: Test common pinned
run: |
set -x # print commands that are executed
. .venv/bin/activate
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-common" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
- name: Generate coverage XML
run: |
. .venv/bin/activate
coverage combine .coverage*
coverage xml -i
- uses: codecov/codecov-action@v4
Expand Down
28 changes: 22 additions & 6 deletions .github/workflows/test-integrations-data-processing.yml
Expand Up @@ -38,36 +38,44 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Setup Test Env
run: |
pip install coverage "tox>=3,<4"
- name: Erase coverage
run: |
pip install uv
uv venv
. .venv/bin/activate
uv pip install coverage tox tox-uv
coverage erase
- name: Test arq latest
run: |
set -x # print commands that are executed
. .venv/bin/activate
./scripts/runtox.sh "py${{ matrix.python-version }}-arq-latest" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
- name: Test beam latest
run: |
set -x # print commands that are executed
. .venv/bin/activate
./scripts/runtox.sh "py${{ matrix.python-version }}-beam-latest" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
- name: Test celery latest
run: |
set -x # print commands that are executed
. .venv/bin/activate
./scripts/runtox.sh "py${{ matrix.python-version }}-celery-latest" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
- name: Test huey latest
run: |
set -x # print commands that are executed
. .venv/bin/activate
./scripts/runtox.sh "py${{ matrix.python-version }}-huey-latest" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
- name: Test openai latest
run: |
set -x # print commands that are executed
. .venv/bin/activate
./scripts/runtox.sh "py${{ matrix.python-version }}-openai-latest" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
- name: Test rq latest
run: |
set -x # print commands that are executed
. .venv/bin/activate
./scripts/runtox.sh "py${{ matrix.python-version }}-rq-latest" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
- name: Generate coverage XML
run: |
. .venv/bin/activate
coverage combine .coverage*
coverage xml -i
- uses: codecov/codecov-action@v4
Expand All @@ -94,36 +102,44 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Setup Test Env
run: |
pip install coverage "tox>=3,<4"
- name: Erase coverage
run: |
pip install uv
uv venv
. .venv/bin/activate
uv pip install coverage tox tox-uv
coverage erase
- name: Test arq pinned
run: |
set -x # print commands that are executed
. .venv/bin/activate
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-arq" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
- name: Test beam pinned
run: |
set -x # print commands that are executed
. .venv/bin/activate
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-beam" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
- name: Test celery pinned
run: |
set -x # print commands that are executed
. .venv/bin/activate
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-celery" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
- name: Test huey pinned
run: |
set -x # print commands that are executed
. .venv/bin/activate
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-huey" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
- name: Test openai pinned
run: |
set -x # print commands that are executed
. .venv/bin/activate
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-openai" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
- name: Test rq pinned
run: |
set -x # print commands that are executed
. .venv/bin/activate
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-rq" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
- name: Generate coverage XML
run: |
. .venv/bin/activate
coverage combine .coverage*
coverage xml -i
- uses: codecov/codecov-action@v4
Expand Down