Skip to content

Commit 98c3945

Browse files
authored
Merge pull request #383 from OpenSPP/fixing_build
Fixing build and tests
2 parents 863ae4a + 9c58a99 commit 98c3945

File tree

5 files changed

+29
-14
lines changed

5 files changed

+29
-14
lines changed

.github/workflows/test.yml

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,15 @@ jobs:
3838
fail-fast: false
3939
matrix:
4040
include:
41-
- container: ghcr.io/oca/oca-ci/py3.10-odoo17.0:latest
41+
- container: ghcr.io/openspp/oca-ci/py3.10-odoo17.0:latest
4242
name: test with Odoo
43-
- container: ghcr.io/oca/oca-ci/py3.10-ocb17.0:latest
43+
- container: ghcr.io/openspp/oca-ci/py3.10-ocb17.0:latest
4444
name: test with OCB
4545
makepot: "true"
4646
sonar: "true"
4747
services:
4848
postgres:
49-
image: postgres:15.0
49+
image: postgis/postgis:15-3.4
5050
env:
5151
POSTGRES_USER: odoo
5252
POSTGRES_PASSWORD: odoo
@@ -60,20 +60,32 @@ jobs:
6060

6161
# Clone OpenG2P Registry repository
6262
- name: Clone OpenG2P Registry Repository
63-
run: git clone https://github.com/OpenG2P/openg2p-registry.git --depth 1 --branch 17.0-fix-build
63+
run: git clone https://github.com/OpenG2P/openg2p-registry.git --depth 1 --branch 17.0-develop
6464
# Clone OpenG2P Programs repository
6565
- name: Clone OpenG2P Programs Repository
66-
run: git clone https://github.com/OpenG2P/openg2p-program.git --depth 1 --branch 17.0-fix-build
66+
run: git clone https://github.com/OpenG2P/openg2p-program.git --depth 1 --branch 17.0-develop
6767
- name: Clone geospatial Repository
6868
run: git clone https://github.com/OpenSPP/geospatial.git --depth 1 --branch 17.0-mig-base_geoengine
69+
- name: Clone Muk Addons Repository
70+
run: git clone https://github.com/muk-it/odoo-modules.git --depth 1 --branch 17.0
6971
- name: Copy OpenG2P modules to addons directory
70-
# exclude openg2p-registry/odoo-addon-base_rest as it is not migrated to 17.0
72+
# exclude openg2p-program/odoo-addon-base_rest as it is not migrated to 17.0
7173
run: |
72-
rm -rf openg2p-registry/*rest_api* openg2p-program/*rest_api* openg2p-program/g2p_payment_files openg2p-program/g2p_documents openg2p-program/g2p_program_documents
74+
rm -rf openg2p-program/*rest_api* openg2p-program/g2p_documents
75+
rm -rf odoo-modules/muk_web_enterprise_theme
7376
cp -r openg2p-registry/* ${ADDONS_DIR}/
7477
cp -r openg2p-program/* ${ADDONS_DIR}/
7578
cp -r geospatial/* ${ADDONS_DIR}/
79+
# MUK Addons
80+
cp -r odoo-modules/* ${ADDONS_DIR}/
81+
- name: Add g2p-programs and odoo-test-helper to test-requirements.txt
82+
run: |
83+
echo "git+https://github.com/OpenG2P/[email protected]#subdirectory=g2p_programs" >> test-requirements.txt
84+
echo "odoo-test-helper" >> test-requirements.txt
7685
- name: Install addons and dependencies
86+
env:
87+
SKIP_EXT_DEB_DEPENDENCIES: "true"
88+
EXCLUDE_REGEX: "odoo-addon-g2p.*|odoo-addon-muk.*"
7789
run: oca_install_addons
7890
- name: Check licenses
7991
run: manifestoo -d . check-licenses
@@ -84,6 +96,8 @@ jobs:
8496
- name: Initialize test db
8597
run: oca_init_test_database
8698
- name: Run tests
99+
env:
100+
EXCLUDE: "g2p_bank,g2p_entitlement_differential,g2p_entitlement_in_kind,g2p_entitlement_voucher,g2p_payment_cash,g2p_payment_files,g2p_payment_g2p_connect,g2p_payment_interop_layer,g2p_payment_phee,g2p_payment_simple_mpesa,g2p_program_approval,g2p_program_assessment,g2p_program_autoenrol,g2p_program_cycleless,g2p_program_documents,g2p_program_registrant_info,g2p_program_reimbursement,g2p_programs,g2p_proxy_means_test,g2p_registry_addl_info,g2p_registry_base,g2p_registry_group,g2p_registry_individual,g2p_registry_membership,muk_product,muk_web_appsbar,muk_web_chatter,muk_web_colors,muk_web_dialog,muk_web_theme"
87101
run: oca_run_tests
88102
- uses: codecov/codecov-action@v1
89103
- name: Update .pot files

g2p_connect_demo/__manifest__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"g2p_registry_group",
1717
"g2p_registry_membership",
1818
"g2p_programs",
19-
"g2p_bank",
19+
# "g2p_bank",
2020
"spp_custom_field",
2121
# "spp_custom_fields_ui",
2222
"g2p_entitlement_cash",

spp_change_request/tests/common.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,11 @@ def setUpClass(cls):
3434
)
3535
return super().setUpClass()
3636

37-
def _create_registrant(self, vals):
38-
self.assertTrue(isinstance(vals, dict), "Return vals should be a dict!")
37+
@classmethod
38+
def _create_registrant(cls, vals):
39+
cls.assertTrue(isinstance(vals, dict), "Return vals should be a dict!")
3940
vals.update({"is_registrant": True})
40-
return self.env["res.partner"].create(vals)
41+
return cls.env["res.partner"].create(vals)
4142

4243
@patch("odoo.addons.spp_change_request.models.change_request.ChangeRequestBase._selection_request_type_ref_id")
4344
def _create_change_request(self, mock_request_type_selection):

spp_custom_filter_ui/__manifest__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"maintainers": ["nhatnm0612"],
77
"website": "https://github.com/OpenSPP/openspp-modules",
88
"license": "LGPL-3",
9-
"depends": ["spp_custom_filter"],
9+
"depends": ["spp_custom_filter", "g2p_registry_group", "g2p_programs"],
1010
"auto_install": False,
1111
"application": False,
1212
}

spp_demo/__manifest__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@
1919
"spp_custom_field",
2020
"spp_custom_field_recompute_daily",
2121
"spp_idpass",
22-
"spp_helpdesk",
22+
# "spp_helpdesk",
2323
"spp_area",
2424
"theme_openspp_muk",
2525
"spp_pos",
26-
"spp_sms",
26+
# "spp_sms",
2727
"queue_job",
2828
],
2929
"external_dependencies": {"python": ["faker"]},

0 commit comments

Comments
 (0)