Skip to content

Commit

Permalink
fix(tests): Add Spark testsuite to tox.ini and to CI (#3199)
Browse files Browse the repository at this point in the history
  • Loading branch information
sentrivana authored and antonpirker committed Jun 25, 2024
1 parent 71c5f40 commit f5dd9ce
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 3 deletions.
10 changes: 9 additions & 1 deletion .github/workflows/test-integrations-data-processing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.6","3.7","3.8","3.11","3.12"]
python-version: ["3.6","3.7","3.8","3.10","3.11","3.12"]
# python3.6 reached EOL and is no longer being supported on
# new versions of hosted runners on Github Actions
# ubuntu-20.04 is the last version that supported python3.6
Expand Down Expand Up @@ -64,6 +64,10 @@ jobs:
run: |
set -x # print commands that are executed
./scripts/runtox.sh "py${{ matrix.python-version }}-rq-latest" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
- name: Test spark latest
run: |
set -x # print commands that are executed
./scripts/runtox.sh "py${{ matrix.python-version }}-spark-latest" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
- name: Generate coverage XML
run: |
coverage combine .coverage*
Expand Down Expand Up @@ -118,6 +122,10 @@ jobs:
run: |
set -x # print commands that are executed
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-rq" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
- name: Test spark pinned
run: |
set -x # print commands that are executed
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-spark" --cov=tests --cov=sentry_sdk --cov-report= --cov-branch
- name: Generate coverage XML
run: |
coverage combine .coverage*
Expand Down
1 change: 1 addition & 0 deletions scripts/split-tox-gh-actions/split-tox-gh-actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@
"celery",
"huey",
"rq",
"spark",
],
"Databases": [
"asyncpg",
Expand Down
15 changes: 13 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
[tox]
requires =
# This version introduced using pip 24.1 which does not work with older Celery and HTTPX versions.
virtualenv<20.26.3
virtualenv<20.26.3
envlist =
# === Common ===
{py3.6,py3.7,py3.8,py3.9,py3.10,py3.11,py3.12}-common
Expand Down Expand Up @@ -219,6 +219,10 @@ envlist =
{py3.7,py3.11}-sanic-v{23}
{py3.8,py3.11}-sanic-latest

# Spark
{py3.8,py3.10,py3.11}-spark-v{3.1,3.3,3.5}
{py3.8,py3.10,py3.11}-spark-latest

# Starlette
{py3.7,py3.10}-starlette-v{0.19}
{py3.7,py3.11}-starlette-v{0.20,0.24,0.28}
Expand Down Expand Up @@ -564,6 +568,12 @@ deps =
sanic-v23: sanic~=23.0
sanic-latest: sanic

# Spark
spark-v3.1: pyspark~=3.1.0
spark-v3.3: pyspark~=3.3.0
spark-v3.5: pyspark~=3.5.0
spark-latest: pyspark

# Starlette
starlette: pytest-asyncio
starlette: python-multipart
Expand Down Expand Up @@ -643,6 +653,7 @@ setenv =
gcp: TESTPATH=tests/integrations/gcp
gql: TESTPATH=tests/integrations/gql
graphene: TESTPATH=tests/integrations/graphene
grpc: TESTPATH=tests/integrations/grpc
httpx: TESTPATH=tests/integrations/httpx
huey: TESTPATH=tests/integrations/huey
huggingface_hub: TESTPATH=tests/integrations/huggingface_hub
Expand All @@ -659,14 +670,14 @@ setenv =
requests: TESTPATH=tests/integrations/requests
rq: TESTPATH=tests/integrations/rq
sanic: TESTPATH=tests/integrations/sanic
spark: TESTPATH=tests/integrations/spark
starlette: TESTPATH=tests/integrations/starlette
starlite: TESTPATH=tests/integrations/starlite
sqlalchemy: TESTPATH=tests/integrations/sqlalchemy
strawberry: TESTPATH=tests/integrations/strawberry
tornado: TESTPATH=tests/integrations/tornado
trytond: TESTPATH=tests/integrations/trytond
socket: TESTPATH=tests/integrations/socket
grpc: TESTPATH=tests/integrations/grpc

COVERAGE_FILE=.coverage-{envname}
passenv =
Expand Down

0 comments on commit f5dd9ce

Please sign in to comment.