How to do it...

To integrate the OCA maintainer-quality-tools with your repository, you need to perform the following steps:

  1. Connect to https://travis-ci.org/:

  1. To sign in, choose Sign in with GitHub.
  2. Click on your name in the top-right corner to access your profile settings, as shown in the following screenshot:

  1. Click on the Sync button to load information about your public repositories in Travis. This might take a couple of minutes depending on how many repositories you have.
  2. For all the repositories on which you want to use Travis, toggle the grey cross so that it displays a green checkmark.
  1. You can click on the cogwheel to access each of the settings of each repository, but the default settings are okay too.
  2. Inside a local clone of your repository, create a file called .travis.yml with the following content:
language: python
sudo: false
cache:
  apt: true
  directories:
    - $HOME/.cache/pip
python:
  - "3.5"
addons:
  apt:
    packages:
      - expect-dev  # provides unbuffer utility
      - python-lxml  # because pip installation is slow
      - python-simplejson
      - python-serial
      - python-yaml
virtualenv:
  system_site_packages: true
env:
  global:
    - VERSION="12.0" TESTS="0" LINT_CHECK="0"
  matrix:
    - LINT_CHECK="1"
    - TESTS="1" ODOO_REPO="odoo/odoo"
    - TESTS="1" ODOO_REPO="OCA/OCB"
install:
  - git clone --depth=1 https://github.com/OCA/maintainer-quality-tools.git ${HOME}/maintainer-quality-tools
  - export PATH=${HOME}/maintainer-quality-tools/travis:${PATH}
  - travis_install_nightly
script:
  - travis_run_tests
after_success:
  - travis_after_tests_success
  
  1. Commit the file and push it to GitHub:
    $ git add .travis.yml
    $ git commit -m "add travis configuration"
    $ git push origin
  1. Go to your travis-ci.org page and click on your project's name. You should see a first build in progress. If your code follows the OCA coding standard, it may even be green on the first run:
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset