From 1574503ae72096266138382a623d275e2f4f6698 Mon Sep 17 00:00:00 2001 From: Daniel Reis Date: Thu, 18 Sep 2014 15:04:34 +0100 Subject: [PATCH] Update TravisCI tests --- .coveragerc | 16 ---------------- .travis.yml | 47 +++++++++++++---------------------------------- 2 files changed, 13 insertions(+), 50 deletions(-) delete mode 100644 .coveragerc diff --git a/.coveragerc b/.coveragerc deleted file mode 100644 index cbd4a493..00000000 --- a/.coveragerc +++ /dev/null @@ -1,16 +0,0 @@ -# Config file .coveragerc - -[report] -include = - */OCA/web/* -omit = - */tests/* - *__init__.py - -# Regexes for lines to exclude from consideration -exclude_lines = - # Have to re-enable the standard pragma - pragma: no cover - - # Don't complain about null context checking - if context is None: diff --git a/.travis.yml b/.travis.yml index d5237d14..68d5c15b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,46 +1,25 @@ -# Config file .travis.yml - language: python python: -# - "pypy" # not supported by odoo 8 -# - "3.4" # not supported by odoo 8 -# - "3.3" # not supported by odoo 8 - - "2.7" -# - "2.6" # not supported by odoo 8 + - "2.7" env: - - ODOO="https://github.com/savoirfairelinux/odoo/archive/setuptools-addons.tar.gz" # Temp until https://github.com/odoo/odoo/issues/185 or https://github.com/odoo/odoo/issues/441 is fixed -# - ODOO="https://github.com/odoo/odoo/archive/master.tar.gz" -# - ODOO="https://github.com/OCA/OCB/archive/master.zip" + - VERSION="8.0" ODOO_REPO="odoo/odoo" + - VERSION="8.0" ODOO_REPO="OCA/OCB" + - VERSION="8.0" UNIT_TEST="1" -# Need coveralls for coverage reports -# Need flake8 for pep8 testing -# Need pypdf -# Manually get PyChart -# Install tested version of odoo (official or ocb) -# Get modules from other repos which have dependencies (in this case travel requires modules from lp:partner-contact-management and lp:openerp-hr -install: - - pip install coveralls flake8 - - pip install http://download.gna.org/pychart/PyChart-1.39.tar.gz - - pip install pypdf - - pip install ${ODOO} +virtualenv: + system_site_packages: true -# Create databae -# Pre-install modules and dependencies -before_script: - - createdb test +install: + - git clone https://github.com/OCA/maintainer-quality-tools.git ${HOME}/maintainer-quality-tools + - export PATH=${HOME}/maintainer-quality-tools/travis:${PATH} + - travis_install_nightly +# example: dependency +# - git clone https://github.com/OCA/webkit-tools -b ${VERSION} $HOME/webkit-tools -# Test with flake, ignore F401 for __init__.py files, use a max length of 120 -# Run tests with coverage -# Only test modules in repo (list populated by directories in repo) -# Preload modules before testing to only run tests of repo's modules -# Include current directory and dependent repos in addons-path as well as official addons script: - - flake8 . --max-line-length=120 --exclude=__unported__ --filename=__init__.py --ignore=F401 - - flake8 . --max-line-length=120 --exclude=__unported__,__init__.py - - odoo.py -d test --stop-after-init --init=$(python -c 'import os; print(",".join(x for x in os.listdir(".") if os.path.isdir(x) and not x.startswith(".") and x != "__unported__"))') --addons-path=$(pwd),`python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())"`/addons - - coverage run $(which odoo.py) -d test --test-enable --log-level=test --stop-after-init --init=$(python -c 'import os; print(",".join(x for x in os.listdir(".") if os.path.isdir(x) and not x.startswith(".") and x != "__unported__"))') --addons-path=$(pwd),`python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())"`/addons + - travis_run_tests after_success: coveralls