You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

44 lines
2.2 KiB

  1. # Config file .travis.yml
  2. language: python
  3. python:
  4. # - "pypy" # not supported by odoo 8
  5. # - "3.4" # not supported by odoo 8
  6. # - "3.3" # not supported by odoo 8
  7. - "2.7"
  8. # - "2.6" # not supported by odoo 8
  9. env:
  10. - 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
  11. # - ODOO="https://github.com/odoo/odoo/archive/master.tar.gz"
  12. # - ODOO="https://github.com/OCA/OCB/archive/master.zip"
  13. # Need coveralls for coverage reports
  14. # Need flake8 for pep8 testing
  15. # Manually get PyChart
  16. # Install tested version of odoo (official or ocb)
  17. # Get modules from other repos which have dependencies (in this case travel requires modules from lp:partner-contact-management and lp:openerp-hr
  18. install:
  19. - pip install coveralls flake8
  20. - pip install http://download.gna.org/pychart/PyChart-1.39.tar.gz
  21. - pip install ${ODOO}
  22. # Create databae
  23. # Pre-install modules and dependencies
  24. before_script:
  25. - createdb test
  26. # Test with flake, ignore F401 for __init__.py files, use a max length of 120
  27. # Run tests with coverage
  28. # Only test modules in repo (list populated by directories in repo)
  29. # Preload modules before testing to only run tests of repo's modules
  30. # Include current directory and dependent repos in addons-path as well as official addons
  31. script:
  32. - flake8 . --max-line-length=120 --exclude=__unported__ --filename=__init__.py --ignore=F401
  33. - flake8 . --max-line-length=120 --exclude=__unported__,__init__.py
  34. - 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
  35. - 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
  36. after_success:
  37. coveralls