← Back to team overview

openerp-community team mailing list archive

Re: OCA 8.0 Suggestion: use travis-ci.org for testing addons

 

On 05/20/2014 09:31 PM, Sandy Carter wrote:
Hello Community.

I have a proposal for submit before we start porting our projects to
8.0.

I suggest we add travis.yml to the root of each addon repository.
That way, we can use the free service of travis-ci.org to do initial
testing of each MP and each commit.

This will greatly reduce the amount of redundant manual testing reviews
have to do (e.g. Fix pep8, the MP fails tests) and gives an output of
these MPs being run on a machine which doesn't actually cost us any
ressource. Looking at the output, we could easily see the warnings in a
log without having to clone and run the tests myself -- a process which
is quite time consuming.

I have included my proposal travis config file template. This is a rough
first draft, it is very possible that it needs tweaking.
It tests on python2.6, python2.7 (possibility to add 3.4 and pypy when
they become supported) with odoo and with ocb.
  - It will first test pep8 compliance.
    - Use a max line length of 120
    - Ignore error F401 ("imported but unused") in __init__.py files.
  - It then runs odoo in test mode for each of the modules in the
repository.
    - There is also a coverage report being run which shows what portion
of the code is covered by tests (a .coveragerc  file is also provided).

Thanks Sandy, this is great.



References