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

Odoo18 ci #61

Merged
merged 4 commits into from
Oct 23, 2024
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
9 changes: 6 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,15 @@ jobs:
- python-version: "3.12"
toxenv: "py312-17.0"
machine: ubuntu-22.04
- python-version: "3.10"
- python-version: "3.12"
toxenv: "py312-18.0"
machine: ubuntu-24.04
- python-version: "3.12"
toxenv: "twine_check"
machine: ubuntu-22.04
machine: ubuntu-24.04
services:
postgres:
image: postgres:9.6
image: postgres:12
env:
POSTGRES_USER: odoo
POSTGRES_PASSWORD: odoo
Expand Down
5 changes: 4 additions & 1 deletion click_odoo/env_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,10 @@ def _configure_odoo(self, ctx):
odoo.tools.config["db_name"] = None
# see https://github.com/odoo/odoo/commit/b122217f74
odoo.tools.config["load_language"] = None
odoo.tools.config.parse_config(odoo_args)
if odoo.release.version_info >= (18, 0):
odoo.tools.config.parse_config(odoo_args, setup_logging=True)
else:
odoo.tools.config.parse_config(odoo_args)
odoo.cli.server.report_configuration()

def _db_exists(self, dbname):
Expand Down
2 changes: 1 addition & 1 deletion tests/test_click_odoo.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
# This hack is necessary because the way CliRunner patches
# stdout is not compatible with the Odoo logging initialization
# mechanism. Logging is therefore tested with subprocesses.
odoo.netsvc._logger_init = True
odoo.netsvc.init_logger = lambda: None


def _init_odoo_db(dbname):
Expand Down
3 changes: 2 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

[tox]
envlist =
py312-{16.0,17.0}
py312-{16.0,17.0,18.0}
py310-{16.0,17.0}
py38-{15.0}
py36-{11.0,12.0,13.0,14.0}
Expand All @@ -22,6 +22,7 @@ commands =
15.0: {toxinidir}/tests/scripts/install_odoo.py 15.0 {envdir}/src/odoo
16.0: {toxinidir}/tests/scripts/install_odoo.py 16.0 {envdir}/src/odoo
17.0: {toxinidir}/tests/scripts/install_odoo.py 17.0 {envdir}/src/odoo
18.0: {toxinidir}/tests/scripts/install_odoo.py 18.0 {envdir}/src/odoo
master: {toxinidir}/tests/scripts/install_odoo.py master {envdir}/src/odoo
pytest --verbose --cov=click_odoo --cov-branch --cov-report=html --cov-report=term --cov-report=xml {posargs}
deps =
Expand Down
Loading