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.

46 lines
2.2 KiB

11 years ago
  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. # Need pypdf
  16. # Manually get PyChart
  17. # Install tested version of odoo (official or ocb)
  18. # Get modules from other repos which have dependencies (in this case travel requires modules from lp:partner-contact-management and lp:openerp-hr
  19. install:
  20. - pip install coveralls flake8
  21. - pip install http://download.gna.org/pychart/PyChart-1.39.tar.gz
  22. - pip install pypdf
  23. - pip install ${ODOO}
  24. # Create databae
  25. # Pre-install modules and dependencies
  26. before_script:
  27. - createdb test
  28. # Test with flake, ignore F401 for __init__.py files, use a max length of 120
  29. # Run tests with coverage
  30. # Only test modules in repo (list populated by directories in repo)
  31. # Preload modules before testing to only run tests of repo's modules
  32. # Include current directory and dependent repos in addons-path as well as official addons
  33. script:
  34. - flake8 . --max-line-length=120 --exclude=__unported__ --filename=__init__.py --ignore=F401
  35. - flake8 . --max-line-length=120 --exclude=__unported__,__init__.py
  36. - 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
  37. - 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
  38. after_success:
  39. coveralls