[IMP] common: Support support include, exclude and extra tags features
The old CI was using INCLUDE and EXCLUDE environment variables in order to know what modules to test:
The rules were:
- if INCLUDE is defined so only these modules (separated by commas) are used to test
- if INCLUDE is not defined so all modules of the main repository will be tested
- if EXCLUDE is defined so these modules will be removed from included result
- if EXCLUDE is not defined so any modules are excluded
Check the code related:
Since that deployv could be used for repositories using this way to be tested so we need to support the same environment variables in order to avoid new changes and working out-of-box
Even it is good to test modules where a main app is not even assigned
- [REF] common: test - Show command executed in order to reproduced it locally
Dummy:
- https://git.vauxoo.com/vauxoo/costarica/-/merge_requests/734
- https://git.vauxoo.com/vauxoo/demo-enterprise/-/merge_requests/1
- https://git.vauxoo.com/vauxoo/ecuador/-/merge_requests/93
- https://git.vauxoo.com/vauxoo/hr-advanced/-/merge_requests/50
- https://git.vauxoo.com/vauxoo/l10n-mx-payroll/-/merge_requests/487
- https://git.vauxoo.com/vauxoo/mexico/-/merge_requests/3343 (Testing extra tags include and exclude variants)
- https://git.vauxoo.com/vauxoo/mexico/-/merge_requests/3347
- https://git.vauxoo.com/vauxoo/mexico/-/merge_requests/3348
- https://git.vauxoo.com/vauxoo/sbd/-/merge_requests/676
- https://git.vauxoo.com/vauxoo/tanner-common/-/merge_requests/29
- https://git.vauxoo.com/vauxoo/vendor-bills/-/merge_requests/193
- https://git.vauxoo.com/vauxoo/villagroup/-/merge_requests/314
- xunnel-account!178 (closed)
- https://git.vauxoo.com/vauxoo/hr-advanced/-/merge_requests/49
- https://git.vauxoo.com/vauxoo/costarica/-/merge_requests/733
Pipeline related:
Projects using INCLUDE or EXCLUDE:
odoo-sh CI is using similar options:
Cases of use:
-
INCLUDE=company_country,ALL
- where we need to pre-install this module in test environment in order to raise error because of auto-installinggeneric_coa
but it is not part of dependency of the main app: https://git.vauxoo.com/vauxoo/mexico-document/-/blob/1c42bcbbc13f4354534636958825de96ee45b869/.gitlab-ci.yml#L24 - "Rebel modules" - Modules not compatible to run tests together e.g. https://github.com/OCA/account-financial-tools/pull/1394#issuecomment-1124076437
- "Change the test-tags" - https://git.vauxoo.com/qualifirst/qualifirst/-/blob/c29fe4f6f8a1b32e5f526df2f437ed84dedf62e1/.gitlab-ci.yml#L47
-
INCLUDE="l10n_mx,ALL"
needs to install modules from antoher repository otherwise odoo auto-install generic_coa if there is not l10n_* module defined and the tests fail (see vauxoo/vendor-bills@13_0:variables.sh:9)
Compatibility with MQT: