Commit 6c01879a authored by Andrey Mironov's avatar Andrey Mironov
Browse files

tests with dump template_database

parent 5a2bf284
......@@ -14,13 +14,15 @@ tests:
- export PGHOST="postgres"
- export PGUSER="postgres"
- export PGPASSWORD=""
- export VIRTUAL_ENV="${VENDOR}/venv"
#
- export MQT_TEMPLATE_DB="odoo_template"
- export MQT_TEST_DB="odoo_test"
# Install ssh-agent if not already installed, it is required by Docker.
# (change apt-get to yum if you use an RPM-based image)
#
- 'which ssh-agent || ( apt-get update -y -qq && apt-get install openssh-client -y -qq )'
#
# Run ssh-agent (inside the build environment)
#
- eval $(ssh-agent -s)
......@@ -44,18 +46,16 @@ tests:
- rm ${VENDOR}/maintainer-quality-tools/travis/node || true
- rm ${VENDOR}/maintainer-quality-tools/travis/phantomjs || true
- wget -q -nc -P ${VENDOR}/ https://github.com/${ODOO_REPO}/archive/${VERSION}.zip
- |
if ! [ -d ${VENDOR}/odoo ]; then
wget -q -nc -P ${VENDOR}/ https://github.com/${ODOO_REPO}/archive/${VERSION}.zip;
which unzip || ( apt-get update -y -qq && apt-get install unzip -y -qq );
unzip -qn ${VENDOR}/${VERSION}.zip -d ${VENDOR}/;
unzip -qn ${VENDOR}/${VERSION}.zip -d ${VENDOR}/ && rm -vf ${VENDOR}/${VERSION}.zip;
mv -vf ${VENDOR}/odoo-${VERSION} ${VENDOR}/odoo;
fi
- virtualenv -q ${VIRTUAL_ENV}
- source ${VIRTUAL_ENV}/bin/activate
- pip -qq install odoo-autodiscover
- pip -qq install -e ${VENDOR}/odoo/
- pip -qq install -r requirements.txt
......@@ -63,12 +63,15 @@ tests:
# fix error with travis_install_nightly
- rm -vf ${VENDOR}/odoo-${VERSION}
- if [ -f ${VENDOR}/temp_dump ]; then createdb ${MQT_TEMPLATE_DB} && psql < ${VENDOR}/temp_dump > /dev/null; fi
- HOME=${VENDOR} REPO_CACHED=${VENDOR} travis_install_nightly 1> /dev/null
- cp -v .coveragerc.format .coveragerc || true
- HOME=${VENDOR} OPTIONS="--log-handler=odoo.sql_db:CRITICAL ${ODOO_OPTIONS}" travis_run_tests
- HOME=${VENDOR} travis_after_tests_success 1> /dev/null
- coverage html
- if [ ${CI_COMMIT_REF_NAME} == ${VERSION} ]; then coverage html; fi
- dropdb --if-exists ${MQT_TEST_DB}
- pg_dump -OC ${MQT_TEMPLATE_DB} > ${VENDOR}/temp_dump
coverage: '/TOTAL.+ ([0-9]{1,3}%)/'
artifacts:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment