Skip to content
Merged
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
67 changes: 67 additions & 0 deletions .github/workflows/python_next_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Test Python future version

on:
workflow_dispatch: # Manual trigger.
schedule:
- cron: '1 3 * * 1-5' # Every Monday to Friday at 03:01 AM.
push:
branches:
- main

jobs:
test:
runs-on: ubuntu-latest
container:
image: ghcr.io/pvital/pvital-python:latest
services:
postgres:
image: public.ecr.aws/docker/library/postgres:16.10-trixie
env:
POSTGRES_USER: root
POSTGRES_PASSWORD: passw0rd
POSTGRES_DB: instana_test_db
mariadb:
image: public.ecr.aws/docker/library/mariadb:11.3.2
env:
MYSQL_ROOT_PASSWORD: passw0rd
MYSQL_DATABASE: instana_test_db
redis:
image: public.ecr.aws/docker/library/redis:7.2.4-bookworm
rabbitmq:
image: public.ecr.aws/docker/library/rabbitmq:3.13.0
mongo:
image: public.ecr.aws/docker/library/mongo:7.0.6
gcloud-pubsub:
image: quay.io/thekevjames/gcloud-pubsub-emulator:latest
env:
PUBSUB_EMULATOR_HOST: 0.0.0.0:8681
PUBSUB_PROJECT1: test-project,test-topic
steps:
- uses: actions/checkout@v5
#- name: Set up Python 3.15.0
# uses: actions/setup-python@v5
# with:
# python-version: 3.15.0-alpha.7
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Install Python dependencies
run: |
cp -a /root/base/venv ./venv
. venv/bin/activate
python -m pip install --upgrade pip
pip install -r requirements.txt
#- name: Install Python test dependencies
# run: |
# pip install -r tests/requirements-pre315.txt
- name: Test with pytest
run: |
. venv/bin/activate
pytest -v --junitxml=output_file.xml tests | tee pytest.log
- uses: actions/upload-artifact@v4
with:
name: python_next_test_results
path: |
output_file.xml
pytest.log
overwrite: true

2 changes: 2 additions & 0 deletions pytest.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[pytest]
timeout = 60
log_cli = 1
log_cli_level = WARN
log_cli_format = %(asctime)s %(levelname)s %(message)s
Expand All @@ -10,3 +11,4 @@ testpaths =
tests_autowrapt
markers =
original: mark test to use the original method instead of the mocked ones under `conftest.py`

2 changes: 2 additions & 0 deletions tests/clients/test_google-cloud-pubsub.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
os.environ["PUBSUB_EMULATOR_HOST"] = "localhost:8681"


@pytest.mark.timeout(30)
class TestPubSubPublish(_TraceContextMixin):
publisher = PublisherClient()

Expand Down Expand Up @@ -111,6 +112,7 @@ def __call__(self, message) -> None:
self.calls += 1


@pytest.mark.timeout(30)
class TestPubSubSubscribe(_TraceContextMixin):
@classmethod
def setup_class(cls) -> None:
Expand Down
10 changes: 4 additions & 6 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,13 @@
collect_ignore_glob.append("*test_spyne*")


if sys.version_info >= (3, 14):
if sys.version_info >= (3, 15):
collect_ignore_glob.extend(
[
# Currently not installable dependencies because of 3.14 incompatibilities
# Currently not installable dependencies because of 3.15 incompatibilities
"*test_fastapi*",
# aiohttp-server tests failing due to deprecated methods used
"*test_aiohttp_server*",
# Currently Sanic does not support python >= 3.14
"*test_sanic*",
# Development version of Python always break logging tests, so we skip then
"*test_logging*",
]
)

Expand Down
1 change: 1 addition & 0 deletions tests/requirements-minimal.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
coverage>=5.5
pytest>=4.6
pytest-timeout>=2.4.0
30 changes: 18 additions & 12 deletions tests/requirements-pre314.txt → tests/requirements-pre315.txt
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
-r requirements-minimal.txt
# requirements-minimal.txt
-r requirements-minimal.txt
pytest-timeout>=2.4.0
# setuptools upperbound pinning is temporary and will remain in place until
# packages resolve the failures caused by the pkg_resources deprecation.
setuptools<=81.0.0
# requirements.txt
aioamqp>=0.15.0
aiofiles>=0.5.0
aiohttp>=3.8.3
aiohttp>=3.12.14
aio-pika>=9.5.2
boto3>=1.17.74
bottle>=0.12.25
celery>=5.2.7
Django>=4.2.16
# FastAPI depends on pydantic-core which requires rust to be installed and
# it's not compiling due to python_version restrictions.
# fastapi>=0.115.0; python_version >= "3.13"
# fastapi>=0.115.0
flask>=2.3.2
# gevent is taking more than 20min to build on 3.14
# gevent>=23.9.0.post1
grpcio>=1.14.1
google-cloud-pubsub>=2.0.0
google-cloud-storage>=1.24.0
Expand All @@ -24,20 +26,24 @@ mysqlclient>=2.0.3
PyMySQL[rsa]>=1.0.2
psycopg2-binary>=2.8.6
pika>=1.2.0
# protobuf<=6.30.2
pymongo>=3.11.4
pyramid>=2.0.1
pytest-mock>=3.12.0
pytz>=2024.1
redis>=3.5.3
requests-mock
responses<=0.17.0
# Sanic doesn't support python-3.14 yet
# sanic>=19.9.0
# sanic-testing>=24.6.0
starlette>=0.38.2
sanic>=19.9.0
sanic-testing>=24.6.0
spyne>=2.14.0
sqlalchemy>=2.0.0
starlette>=0.38.2;
tornado>=6.4.1
uvicorn>=0.13.4
urllib3>=1.26.5
httpx>=0.27.0
protobuf<=6.30.2
gevent>=23.9.0.post1
confluent-kafka>=2.0.0
kafka-python-ng>=2.0.0

Loading