Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
Public
suvit-gitlab
Commits
6c01879a
Commit
6c01879a
authored
6 years ago
by
Andrey Mironov
Browse files
Options
Download
Email Patches
Plain Diff
tests with dump template_database
parent
5a2bf284
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
9 deletions
+12
-9
main.yml
main.yml
+12
-9
No files found.
main.yml
View file @
6c01879a
...
...
@@ -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
:
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment