Skip to content

Commit

Permalink
Merge pull request #61 from acsone/odoo18-ci
Browse files Browse the repository at this point in the history
Odoo18 ci
  • Loading branch information
sbidoul authored Oct 23, 2024
2 parents 191d98d + 7e125e7 commit a39f136
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
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

0 comments on commit a39f136

Please sign in to comment.