-
-
Notifications
You must be signed in to change notification settings - Fork 713
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[17.0][OU-ADD] enable tests, add decorator to make them convenient to use #4669
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -85,14 +85,15 @@ jobs: | |
unixodbc-dev | ||
- name: Requirements Installation | ||
run: | | ||
sed -i -E "s/(gevent==)21\.8\.0( ; sys_platform != 'win32' and python_version == '3.10')/\122.10.2\2/;s/(greenlet==)1.1.2( ; sys_platform != 'win32' and python_version == '3.10')/\12.0.2\2/" odoo/requirements.txt | ||
pip install -q -r odoo/requirements.txt | ||
pip install -r ./openupgrade/requirements.txt | ||
# this is for v16 l10n_eg_edi_eta which crashes without it | ||
pip install asn1crypto | ||
- name: Test data | ||
run: | | ||
if test -n "$(ls openupgrade/openupgrade_scripts/scripts/*/*/tests/data*.py 2> /dev/null)"; then | ||
for snippet in openupgrade/openupgrade_scripts/scripts/*/*/tests/data*.py; do | ||
if test -n "$(ls openupgrade/openupgrade_scripts/scripts/*/tests/data*.py 2> /dev/null)"; then | ||
for snippet in openupgrade/openupgrade_scripts/scripts/*/tests/data*.py; do | ||
odoo-old/odoo-bin shell -d $DB < $snippet | ||
done | ||
fi | ||
|
@@ -131,14 +132,16 @@ jobs: | |
echo Execution of Openupgrade with the update of the following modules : $MODULES_NEW | ||
# Silence redundant logs from unlinking records (1 line is enough) | ||
# to prevent log overflow | ||
OPENUPGRADE_TESTS=1 $ODOO \ | ||
$ODOO \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the env var was a leftover from the pre-openupgrade_framework test mechanism |
||
--addons-path=`echo $ADDONS_PATHS | awk -v OFS="," '$1=$1'` \ | ||
--database=$DB \ | ||
--db_host=$DB_HOST \ | ||
--db_password=$DB_PASSWORD \ | ||
--db_port=$DB_PORT \ | ||
--db_user=$DB_USERNAME \ | ||
--load=base,web,openupgrade_framework \ | ||
--test-enable \ | ||
--test-tags openupgrade \ | ||
--log-handler odoo.models.unlink:WARNING \ | ||
--stop-after-init \ | ||
--update=$MODULES_NEW |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is because tests must live in the base directory of the addon's path