Skip to content

Commit

Permalink
Test Python 3.12 on Ubuntu 24.04 LTS
Browse files Browse the repository at this point in the history
  • Loading branch information
tobias-urdin committed Oct 7, 2024
1 parent 147dedd commit 280f70b
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 10 deletions.
1 change: 1 addition & 0 deletions .github/workflows/gnocchi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ jobs:
python:
- py39
- py311
- py312
env:
- mysql-ceph-upgrade-from-4.5
- postgresql-file-upgrade-from-4.5
Expand Down
24 changes: 24 additions & 0 deletions .mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,18 @@ queue_rules:
- check-success=test (py311, postgresql-file-sqlalchemy14)
- check-success=test (py311, postgresql-swift)
- check-success=test (py311, postgresql-s3)
- check-success=test (py312, mysql-ceph-upgrade-from-4.5)
- check-success=test (py312, postgresql-file-upgrade-from-4.5)
- check-success=test (py312, mysql-file)
- check-success=test (py312, mysql-file-sqlalchemy14)
- check-success=test (py312, mysql-swift)
- check-success=test (py312, mysql-s3)
- check-success=test (py312, mysql-ceph)
- check-success=test (py312, postgresql-file)
- check-success=test (py312, postgresql-file-sqlalchemy14)
- check-success=test (py312, postgresql-swift)
- check-success=test (py312, postgresql-s3)
- check-success=test (py312, postgresql-ceph)

pull_request_rules:
- name: automatic merge
Expand Down Expand Up @@ -61,6 +73,18 @@ pull_request_rules:
- check-success=test (py311, postgresql-file-sqlalchemy14)
- check-success=test (py311, postgresql-swift)
- check-success=test (py311, postgresql-s3)
- check-success=test (py312, mysql-ceph-upgrade-from-4.5)
- check-success=test (py312, postgresql-file-upgrade-from-4.5)
- check-success=test (py312, mysql-file)
- check-success=test (py312, mysql-file-sqlalchemy14)
- check-success=test (py312, mysql-swift)
- check-success=test (py312, mysql-s3)
- check-success=test (py312, mysql-ceph)
- check-success=test (py312, postgresql-file)
- check-success=test (py312, postgresql-file-sqlalchemy14)
- check-success=test (py312, postgresql-swift)
- check-success=test (py312, postgresql-s3)
- check-success=test (py312, postgresql-ceph)

- name: automatic merge backports from Mergify
actions:
Expand Down
6 changes: 2 additions & 4 deletions images/Dockerfile.ci
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:22.04
FROM ubuntu:24.04
ENV GNOCCHI_WORKSPACE /github/workspace
ENV DEBIAN_FRONTEND noninteractive

Expand All @@ -15,6 +15,7 @@ RUN apt-get update -y && apt-get install -qy \
python3 \
python3-dev \
python3-pip \
python3-virtualenv \
python3.9 \
python3.9-dev \
python3.9-distutils \
Expand Down Expand Up @@ -55,9 +56,6 @@ ENV LANG en_US.UTF-8
RUN update-locale
RUN locale-gen $LANG

#NOTE(sileht): Upgrade python dev tools
RUN python3 -m pip install -U pip tox virtualenv

RUN npm install [email protected] --global

RUN groupadd --gid 1001 tester
Expand Down
3 changes: 3 additions & 0 deletions images/entrypoint.sh.ci
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
#!/bin/sh
python3 -m virtualenv env
. env/bin/activate
pip install tox
$@
12 changes: 6 additions & 6 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tox]
minversion = 3.1
envlist = {py39,py311}-{postgresql,mysql}{,-file,-file-sqlalchemy14,-swift,-ceph,-s3},pep8
envlist = {py39,py311,py312}-{postgresql,mysql}{,-file,-file-sqlalchemy14,-swift,-ceph,-s3},pep8
skipsdist = True

[testenv]
Expand Down Expand Up @@ -59,12 +59,12 @@ allowlist_externals =
{toxinidir}/run-tests.sh
{toxinidir}/run-func-tests.sh

[testenv:{py38,py39,py311}-{postgresql,mysql}-file-sqlalchemy14]
[testenv:{py38,py39,py311,py312}-{postgresql,mysql}-file-sqlalchemy14]
deps =
{[testenv]deps}
sqlalchemy<2

[testenv:{py39,py311}-postgresql-file-upgrade-from-4.5]
[testenv:{py39,py311,py312}-postgresql-file-upgrade-from-4.5]
# We should always recreate since the script upgrade
# Gnocchi we can't reuse the virtualenv
recreate = True
Expand All @@ -79,7 +79,7 @@ deps =
commands = {toxinidir}/run-upgrade-tests.sh postgresql-file
allowlist_externals = {toxinidir}/run-upgrade-tests.sh

[testenv:{py39,py311}-mysql-ceph-upgrade-from-4.5]
[testenv:{py39,py311,py312}-mysql-ceph-upgrade-from-4.5]
# We should always recreate since the script upgrade
# Gnocchi we can't reuse the virtualenv
recreate = True
Expand All @@ -99,12 +99,12 @@ deps = build
commands = python -m build

[testenv:pep8]
deps = hacking>=3.2.0,<4.0.0
deps = hacking>=3.2.0,<8.0.0
commands = flake8 {posargs}
allowlist_externals =
/usr/bin/flake8

[testenv:{py39,py311}-cover]
[testenv:{py39,py311,py312}-cover]
setenv =
{[testenv]setenv}
PYTHON=coverage run --source gnocchi --parallel-mode
Expand Down

0 comments on commit 280f70b

Please sign in to comment.