Skip to content

Commit

Permalink
Merge pull request #352 from Tecnativa/16.0
Browse files Browse the repository at this point in the history
Support v16
  • Loading branch information
pedrobaeza authored Oct 7, 2022
2 parents 647d6b7 + 223566d commit 958598e
Show file tree
Hide file tree
Showing 7 changed files with 60 additions and 9 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ jobs:
- 3.7
- 3.8
- 3.9
- "3.10"
odoo-version:
- 7.0
- 8.0
Expand All @@ -45,6 +46,7 @@ jobs:
- 13.0
- 14.0
- 15.0
- 16.0
steps:
# Shared steps
- uses: actions/checkout@v3
Expand Down
6 changes: 4 additions & 2 deletions copier.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ _migrations:
odoo_version:
help: On which odoo version is it based?
type: float
default: 15.0
default: 16.0
choices:
- 7.0
- 8.0
Expand All @@ -118,6 +118,7 @@ odoo_version:
- 13.0
- 14.0
- 15.0
- 16.0

odoo_proxy:
default: traefik
Expand Down Expand Up @@ -351,7 +352,7 @@ cidr_whitelist:
⚠️ It must be a list. And this is only supported if you deploy with Traefik 2+.
postgres_version:
default: "13"
default: "14"
help: >-
Which PostgreSQL version do you want to deploy?
choices:
Expand All @@ -361,6 +362,7 @@ postgres_version:
"11": "11"
"12": "12"
"13": "13"
"14": "14"

postgres_username:
type: str
Expand Down
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
frozenset(map(float, os.environ.get("SELECTED_ODOO_VERSIONS", "").split()))
or ALL_ODOO_VERSIONS
)
PRERELEASE_ODOO_VERSIONS = {15.0}
PRERELEASE_ODOO_VERSIONS = {16.0}

# Traefik versions matrix
ALL_TRAEFIK_VERSIONS = ("latest", "1.7")
Expand Down
16 changes: 16 additions & 0 deletions tests/samples/mqt-diffs/v16.0-.pylintrc-mandatory.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
6a7
> manifest_required_authors=Odoo Community Association (OCA)
8c9,10
< manifest_deprecated_keys=active
---
> manifest_deprecated_keys=description,active
> license_allowed=AGPL-3,GPL-2,GPL-2 or any later version,GPL-3,GPL-3 or any later version,LGPL-3
21a24
> development-status-allowed,
28a32
> license-allowed,
30a35
> manifest-required-author,
37,38d41
< missing-import-error,
< missing-manifest-dependency,
17 changes: 17 additions & 0 deletions tests/samples/mqt-diffs/v16.0-.pylintrc.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
7c7
< manifest_required_authors=Tecnativa
---
> manifest_required_authors=Odoo Community Association (OCA)
10c10
< license_allowed=AGPL-3,GPL-2,GPL-2 or any later version,GPL-3,GPL-3 or any later version,LGPL-3,OPL-1,OEEL-1
---
> license_allowed=AGPL-3,GPL-2,GPL-2 or any later version,GPL-3,GPL-3 or any later version,LGPL-3
30a31
> development-status-allowed,
48,49d48
< missing-import-error,
< missing-manifest-dependency,
74a74
> missing-manifest-dependency,
82a83
>
2 changes: 2 additions & 0 deletions tests/test_routing.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ def test_multiple_domains(
},
],
}
if supported_odoo_version < 16:
data["postgres_version"] = 13
dc = docker_compose["-f", f"{environment}.yaml"]
with local.cwd(tmp_path):
copy(
Expand Down
24 changes: 18 additions & 6 deletions tests/test_tasks_downstream.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,11 @@ def _tests_ran(stdout, odoo_version, addon_name):
suffix = r"\srunning tests."
if odoo_version < 10.0:
main_pkg = "openerp"
assert re.search(fr"{main_pkg}\.addons\.{addon_name}\.tests\.\w+{suffix}", stdout)
assert re.search(rf"{main_pkg}\.addons\.{addon_name}\.tests\.\w+{suffix}", stdout)
# Check no alien addons are installed, updated or tested
if addon_name != "base":
assert "module base: creating or updating database tables" not in stdout
assert not re.search(fr"{main_pkg}\.addons\.base\.tests\.\w+{suffix}", stdout)
assert not re.search(rf"{main_pkg}\.addons\.base\.tests\.\w+{suffix}", stdout)


@pytest.mark.sequential
Expand All @@ -97,11 +97,14 @@ def test_resetdb(
"""
try:
with local.cwd(tmp_path):
data = {"odoo_version": supported_odoo_version}
if supported_odoo_version < 16:
data["postgres_version"] = 13
copy(
src_path=str(cloned_template),
vcs_ref="HEAD",
force=True,
data={"odoo_version": supported_odoo_version},
data=data,
)
# Imagine the user is in the src subfolder for these tasks
with local.cwd(tmp_path / "odoo" / "custom" / "src"):
Expand Down Expand Up @@ -186,11 +189,14 @@ def test_start(
"""
try:
with local.cwd(tmp_path):
data = {"odoo_version": supported_odoo_version}
if supported_odoo_version < 16:
data["postgres_version"] = 13
copy(
src_path=str(cloned_template),
vcs_ref="HEAD",
force=True,
data={"odoo_version": supported_odoo_version},
data=data,
)
# Imagine the user is in the src subfolder for these tasks
with local.cwd(tmp_path / "odoo" / "custom" / "src"):
Expand Down Expand Up @@ -231,11 +237,14 @@ def test_install_test(
"""
try:
with local.cwd(tmp_path):
data = {"odoo_version": supported_odoo_version}
if supported_odoo_version < 16:
data["postgres_version"] = 13
copy(
src_path=str(cloned_template),
vcs_ref="HEAD",
force=True,
data={"odoo_version": supported_odoo_version},
data=data,
)
# Imagine the user is in the src subfolder for these tasks
# and the DB is clean
Expand Down Expand Up @@ -307,11 +316,14 @@ def test_test_tasks(
"""
try:
with local.cwd(tmp_path):
data = {"odoo_version": supported_odoo_version}
if supported_odoo_version < 16:
data["postgres_version"] = 13
copy(
src_path=str(cloned_template),
vcs_ref="HEAD",
force=True,
data={"odoo_version": supported_odoo_version},
data=data,
)
# Imagine the user is in the src subfolder for these tasks
# and the DB is clean
Expand Down

0 comments on commit 958598e

Please sign in to comment.