From 072cfae2e9ae70cfdb62a3aa93e181ef10d7bb4d Mon Sep 17 00:00:00 2001 From: Enric Tobella Date: Mon, 6 Nov 2023 13:00:49 +0100 Subject: [PATCH] Add version 17 --- .github/workflows/test.yml | 3 +++ copier.yml | 3 ++- .../{% if ci == 'GitHub' %}test.yml{% endif %}.jinja | 2 ++ tests/test_copy.py | 10 +++++++--- 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f9a348f..57dbf14 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -32,6 +32,9 @@ jobs: - odoo-version: 16.0 python-version: "3.10" machine: ubuntu-22.04 + - odoo-version: 17.0 + python-version: "3.10" + machine: ubuntu-22.04 steps: # Prepare environment - uses: actions/checkout@v3 diff --git a/copier.yml b/copier.yml index b9d4800..4a29440 100644 --- a/copier.yml +++ b/copier.yml @@ -13,7 +13,7 @@ _migrations: odoo_version: type: float - default: 16.0 + default: 17.0 choices: - 10.0 - 11.0 @@ -22,6 +22,7 @@ odoo_version: - 14.0 - 15.0 - 16.0 + - 17.0 help: Which Odoo version are we deploying in this branch? org_slug: diff --git a/src/.github/workflows/{% if ci == 'GitHub' %}test.yml{% endif %}.jinja b/src/.github/workflows/{% if ci == 'GitHub' %}test.yml{% endif %}.jinja index 494c963..35c890f 100644 --- a/src/.github/workflows/{% if ci == 'GitHub' %}test.yml{% endif %}.jinja +++ b/src/.github/workflows/{% if ci == 'GitHub' %}test.yml{% endif %}.jinja @@ -12,6 +12,7 @@ on: {% set IMAGES = { "odoo": { + 17.0: "ghcr.io/oca/oca-ci/py3.10-odoo17.0:latest", 16.0: "ghcr.io/oca/oca-ci/py3.10-odoo16.0:latest", 15.0: "ghcr.io/oca/oca-ci/py3.8-odoo15.0:latest", 14.0: "ghcr.io/oca/oca-ci/py3.6-odoo14.0:latest", @@ -21,6 +22,7 @@ set IMAGES = { 10.0: "ghcr.io/oca/oca-ci/py2.7-odoo10.0:latest", }, "ocb": { + 17.0: "ghcr.io/oca/oca-ci/py3.10-ocb17.0:latest", 16.0: "ghcr.io/oca/oca-ci/py3.10-ocb16.0:latest", 15.0: "ghcr.io/oca/oca-ci/py3.8-ocb15.0:latest", 14.0: "ghcr.io/oca/oca-ci/py3.6-ocb14.0:latest", diff --git a/tests/test_copy.py b/tests/test_copy.py index 620f20f..163c866 100644 --- a/tests/test_copy.py +++ b/tests/test_copy.py @@ -57,9 +57,13 @@ def test_bootstrap(tmp_path: Path, odoo_version: float, cloned_template: Path): assert "# This .pylintrc contains" in pylintrc_optional assert f"{valid_odoo_versions}={odoo_version}" in pylintrc_optional assert SOME_PYLINT_OPTIONAL_CHECK in pylintrc_optional - flake8 = (tmp_path / ".flake8").read_text() - assert "[flake8]" in flake8 - if odoo_version > 12: + if odoo_version < 17: + flake8 = (tmp_path / ".flake8").read_text() + assert "[flake8]" in flake8 + else: + ruff = (tmp_path / ".ruff.toml").read_text() + assert "[lint]" in ruff + if odoo_version > 12 and odoo_version < 17: isort = (tmp_path / ".isort.cfg").read_text() assert "[settings]" in isort assert not (tmp_path / ".gitmodules").is_file()