Skip to content

Commit a9c1ea7

Browse files
committed
ci: Add support to test Python 3.15.0
Using GitHub Actions. Signed-off-by: Paulo Vital <paulo.vital@ibm.com>
1 parent 93a5b14 commit a9c1ea7

3 files changed

Lines changed: 89 additions & 18 deletions

File tree

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: Test Python future version
2+
3+
on:
4+
workflow_dispatch: # Manual trigger.
5+
schedule:
6+
- cron: '1 3 * * 1-5' # Every Monday to Friday at 03:01 AM.
7+
push:
8+
branches:
9+
- main
10+
11+
jobs:
12+
test:
13+
runs-on: ubuntu-latest
14+
container:
15+
image: ghcr.io/pvital/pvital-python:latest
16+
services:
17+
postgres:
18+
image: public.ecr.aws/docker/library/postgres:16.10-trixie
19+
env:
20+
POSTGRES_USER: root
21+
POSTGRES_PASSWORD: passw0rd
22+
POSTGRES_DB: instana_test_db
23+
mariadb:
24+
image: public.ecr.aws/docker/library/mariadb:11.3.2
25+
env:
26+
MYSQL_ROOT_PASSWORD: passw0rd
27+
MYSQL_DATABASE: instana_test_db
28+
redis:
29+
image: public.ecr.aws/docker/library/redis:7.2.4-bookworm
30+
rabbitmq:
31+
image: public.ecr.aws/docker/library/rabbitmq:3.13.0
32+
mongo:
33+
image: public.ecr.aws/docker/library/mongo:7.0.6
34+
gcloud-pubsub:
35+
image: quay.io/thekevjames/gcloud-pubsub-emulator:latest
36+
env:
37+
PUBSUB_EMULATOR_HOST: 0.0.0.0:8681
38+
PUBSUB_PROJECT1: test-project,test-topic
39+
steps:
40+
- uses: actions/checkout@v5
41+
#- name: Set up Python 3.15.0
42+
# uses: actions/setup-python@v5
43+
# with:
44+
# python-version: 3.15.0-alpha.7
45+
- name: Display Python version
46+
run: python -c "import sys; print(sys.version)"
47+
- name: Install Python dependencies
48+
run: |
49+
cp -a /root/base/venv ./venv
50+
. venv/bin/activate
51+
python -m pip install --upgrade pip
52+
pip install -r requirements.txt
53+
#- name: Install Python test dependencies
54+
# run: |
55+
# pip install -r tests/requirements-pre315.txt
56+
- name: Test with pytest
57+
run: |
58+
. venv/bin/activate
59+
pytest -v --junitxml=output_file.xml tests | tee pytest.log
60+
- uses: actions/upload-artifact@v4
61+
with:
62+
name: python_next_test_results
63+
path: |
64+
output_file.xml
65+
pytest.log
66+
overwrite: true
67+

tests/conftest.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -76,15 +76,13 @@
7676
collect_ignore_glob.append("*test_spyne*")
7777

7878

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

Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
1-
-r requirements-minimal.txt
1+
# requirements-minimal.txt
2+
-r requirements-minimal.txt
3+
pytest-timeout>=2.4.0
4+
# setuptools upperbound pinning is temporary and will remain in place until
5+
# packages resolve the failures caused by the pkg_resources deprecation.
6+
setuptools<=81.0.0
7+
# requirements.txt
28
aioamqp>=0.15.0
39
aiofiles>=0.5.0
4-
aiohttp>=3.8.3
10+
aiohttp>=3.12.14
511
aio-pika>=9.5.2
612
boto3>=1.17.74
713
bottle>=0.12.25
814
celery>=5.2.7
915
Django>=4.2.16
10-
# FastAPI depends on pydantic-core which requires rust to be installed and
11-
# it's not compiling due to python_version restrictions.
12-
# fastapi>=0.115.0; python_version >= "3.13"
16+
# fastapi>=0.115.0
1317
flask>=2.3.2
14-
# gevent is taking more than 20min to build on 3.14
15-
# gevent>=23.9.0.post1
1618
grpcio>=1.14.1
1719
google-cloud-pubsub>=2.0.0
1820
google-cloud-storage>=1.24.0
@@ -24,20 +26,24 @@ mysqlclient>=2.0.3
2426
PyMySQL[rsa]>=1.0.2
2527
psycopg2-binary>=2.8.6
2628
pika>=1.2.0
29+
# protobuf<=6.30.2
2730
pymongo>=3.11.4
2831
pyramid>=2.0.1
2932
pytest-mock>=3.12.0
3033
pytz>=2024.1
3134
redis>=3.5.3
3235
requests-mock
3336
responses<=0.17.0
34-
# Sanic doesn't support python-3.14 yet
35-
# sanic>=19.9.0
36-
# sanic-testing>=24.6.0
37-
starlette>=0.38.2
37+
sanic>=19.9.0
38+
sanic-testing>=24.6.0
39+
spyne>=2.14.0
3840
sqlalchemy>=2.0.0
41+
starlette>=0.38.2;
3942
tornado>=6.4.1
4043
uvicorn>=0.13.4
4144
urllib3>=1.26.5
4245
httpx>=0.27.0
43-
protobuf<=6.30.2
46+
gevent>=23.9.0.post1
47+
confluent-kafka>=2.0.0
48+
kafka-python-ng>=2.0.0
49+

0 commit comments

Comments
 (0)