forked from sytabaresa/odoo-colombia
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
48 lines (40 loc) · 2.02 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# 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
env:
- ODOO="https://github.com/Bubbles-IT/odoo/archive/master.tar.gz" # Temp until https://github.com/odoo/odoo/pull/81 is solved
# - ODOO="https://github.com/odoo/odoo/archive/master.zip"
# - ODOO="ocb"
# Odoo depends on wkhtmltopdf > 0.12
before_install:
- sudo apt-get install -qq wkhtmltopdf
# Need coveralls for coverage reports
# Need flake8 for pep8 testing
# Manually get PyChart
# Install tested version of odoo (official or ocb)
# Get modules from other repos which have dependencies(here not necessary)
install:
- pip install coveralls flake8
- pip install http://download.gna.org/pychart/PyChart-1.39.tar.gz
- pip install ${ODOO}
# Create databae
# Pre-install modules and dependencies
before_script:
- createdb test
- PYTHONPATH=$(dirname $(which openerp-server))/.. openerp-server -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(".")))') --addons-path=$(pwd)
# Test with flake, ignore F401 for __init__.py files, use a max length of 120
# Run tests with coverage
# Due to oddness of the odoo setup.py process, assure that import openerp gets it from env/openerp and not env/lib/python2.7/site-packages/openerp
# only test modules in repo (list populated by directories in repo)
# include current director and dependent repos in addons-path
script:
- flake8 . --max-line-length=120 --filename=__init__.py --ignore=F401
- flake8 . --max-line-length=120 --exclude=__init__.py
- PYTHONPATH=$(dirname $(which openerp-server))/.. coverage run $(which openerp-server) -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(".")))') --addons-path=$(pwd)
after_success:
coveralls