Skip to content

Commit c34e86b

Browse files
committed
Remove VCI from the build actions
As OpenG2P have moved the VCI addons from the openg2p-vci repo to the openg2-registry repo, we should no longer clone the openg2p-vci repo during the build.
1 parent 6c326f0 commit c34e86b

File tree

2 files changed

+132
-2
lines changed

2 files changed

+132
-2
lines changed

.github/workflows/test-legacy.yml

Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
name: tests (legacy)
2+
# fetching the OpenG2P dependencies from the OpenG2P repositories, using latest revision of branch 17.0/17.0-develop
3+
4+
on:
5+
push:
6+
branches:
7+
- "17.0"
8+
- "17.0-ocabot-*"
9+
- "farmer-registry"
10+
env:
11+
OCA_GIT_USER_NAME: openspp
12+
OCA_GIT_USER_EMAIL: [email protected]
13+
jobs:
14+
unreleased-deps:
15+
runs-on: ubuntu-latest
16+
name: Detect unreleased dependencies
17+
steps:
18+
- uses: actions/checkout@v4
19+
- run: |
20+
for reqfile in requirements.txt test-requirements.txt ; do
21+
if [ -f ${reqfile} ] ; then
22+
result=0
23+
# reject non-comment lines that contain a / (i.e. URLs, relative paths)
24+
grep "^[^#].*/" ${reqfile} || result=$?
25+
if [ $result -eq 0 ] ; then
26+
echo "Unreleased dependencies found in ${reqfile}."
27+
# exit 1
28+
fi
29+
fi
30+
done
31+
test:
32+
runs-on: ubuntu-22.04
33+
container: ${{ matrix.container }}
34+
name: ${{ matrix.name }}
35+
strategy:
36+
fail-fast: false
37+
matrix:
38+
include:
39+
- container: ghcr.io/openspp/oca-ci/py3.10-odoo17.0:jammy
40+
name: test with Odoo 17/Ubuntu 22.04
41+
makepot: "true"
42+
sonar: "true"
43+
services:
44+
postgres:
45+
image: postgis/postgis:15-3.4
46+
env:
47+
POSTGRES_USER: odoo
48+
POSTGRES_PASSWORD: odoo
49+
POSTGRES_DB: odoo
50+
ports:
51+
- 5432:5432
52+
steps:
53+
- uses: actions/checkout@v4
54+
# with:
55+
# persist-credentials: false
56+
- name: Disable demo data
57+
run: |
58+
echo "without_demo = all" >> /etc/odoo.cfg
59+
cat /etc/odoo.cfg
60+
- name: Create temporary test-requirement.txt
61+
run: |
62+
touch spp-test-requirements.txt
63+
echo "--index-url=https://pypi.openspp.org/simple/" >> spp-test-requirements.txt
64+
echo "--extra-index-url=https://pypi.org/simple/" >> spp-test-requirements.txt
65+
cat test-requirements.txt >> spp-test-requirements.txt
66+
# Clone OpenG2P Registry repository
67+
- name: Clone OpenG2P Registry Repository
68+
run: git clone https://github.com/OpenG2P/openg2p-registry.git --depth 1 --branch 17.0-develop
69+
# Clone OpenG2P Programs repository
70+
- name: Clone OpenG2P Programs Repository
71+
run: git clone https://github.com/OpenG2P/openg2p-program.git --depth 1 --branch 17.0-develop
72+
- name: Clone OpenG2P Security Repository
73+
run: git clone https://github.com/OpenG2P/openg2p-security.git --depth 1 --branch 17.0-develop
74+
- name: Clone Muk Addons Repository
75+
run: git clone https://github.com/muk-it/odoo-modules.git --depth 1 --branch 17.0
76+
- name: Remove g2p_connect_demo from openspp-modules as it is not compatible with all OpenSPP variants
77+
run: |
78+
rm -rf g2p_connect_demo
79+
- name: Copy OpenG2P modules to addons directory
80+
# exclude openg2p-program/odoo-addon-base_rest as it is not migrated to 17.0
81+
run: |
82+
rm -rf openg2p-program/*rest_api* openg2p-program/g2p_documents
83+
rm -rf openg2p-registry/*/tests
84+
rm -rf openg2p-program/*/tests
85+
rm -rf openg2p-security/*/tests
86+
rm -rf openg2p-vci/*/tests
87+
rm -rf odoo-modules/muk_web_enterprise_theme
88+
cp -r openg2p-registry/* ${ADDONS_DIR}/
89+
cat test-requirements.txt >> spp-test-requirements.txt
90+
cp -r openg2p-program/* ${ADDONS_DIR}/
91+
cat test-requirements.txt >> spp-test-requirements.txt
92+
cp -r openg2p-security/* ${ADDONS_DIR}/
93+
cat test-requirements.txt >> spp-test-requirements.txt
94+
cp -r openg2p-vci/* ${ADDONS_DIR}/
95+
cat test-requirements.txt >> spp-test-requirements.txt
96+
# MUK Addons
97+
cp -r odoo-modules/* ${ADDONS_DIR}/
98+
- name: Add g2p-programs and odoo-test-helper to spp-test-requirements.txt
99+
run: |
100+
echo "git+https://github.com/OpenG2P/[email protected]#subdirectory=g2p_programs" >> spp-test-requirements.txt
101+
echo "odoo-test-helper" >> spp-test-requirements.txt
102+
- name: Replace test-requirements.txt with spp-test-requirements.txt
103+
run: |
104+
cp spp-test-requirements.txt test-requirements.txt
105+
cat test-requirements.txt
106+
- name: Install addons and dependencies
107+
env:
108+
SKIP_EXT_DEB_DEPENDENCIES: "true"
109+
EXCLUDE_REGEX: "odoo-addon-g2p.*|odoo-addon-muk.*"
110+
run: oca_install_addons
111+
- name: Check licenses
112+
run: manifestoo -d . check-licenses
113+
continue-on-error: true
114+
- name: Check development status
115+
run: manifestoo -d . check-dev-status --default-dev-status=Beta
116+
continue-on-error: true
117+
- name: Initialize test db
118+
run: oca_init_test_database
119+
- name: Remove test files from pip-installed addons
120+
run: |
121+
rm -rf /opt/odoo-venv/lib/python3.10/site-packages/odoo/addons/g2p_programs/tests
122+
rm -rf /opt/odoo-venv/lib/python3.10/site-packages/odoo/addons/g2p_registry_individual/tests
123+
- name: Run tests
124+
env:
125+
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,g2p_openid_vci_rest_api,g2p_openid_vci,g2p_registry_encryption,g2p_encryption,g2p_encryption_keymanager"
126+
run: oca_run_tests
127+
- uses: codecov/codecov-action@v4
128+
with:
129+
token: ${{ secrets.CODECOV_TOKEN }}
130+
- name: Update .pot files
131+
run: oca_export_and_push_pot https://x-access-token:${{ secrets.GIT_PUSH_TOKEN }}@github.com/${{ github.repository }}
132+
if: ${{ matrix.makepot == 'true' && github.event_name == 'push' && github.repository_owner == 'openspp' }}

.github/workflows/test.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,6 @@ jobs:
9797
run: git clone https://github.com/OpenSPP/openg2p-program.git --depth 1 --branch 17.0-develop-openspp
9898
- name: Clone OpenG2P Security Repository
9999
run: git clone https://github.com/OpenSPP/openg2p-security.git --depth 1 --branch 17.0-develop-openspp
100-
- name: Clone OpenG2P VCI Repository
101-
run: git clone https://github.com/OpenSPP/openg2p-vci.git --depth 1 --branch 17.0-develop-openspp
102100
- name: Clone Muk Addons Repository
103101
run: git clone https://github.com/OpenSPP/mukit-modules.git --depth 1 --branch 17.0-openspp
104102
- name: Copy OpenG2P modules to addons directory, remove tests and unsupported modules

0 commit comments

Comments
 (0)