language: python
python:
  - "2.7"
cache:

  # TODO local node modules path correct?
  directories:
    - $HOME/.pip-cache/
    - /usr/lib/node_modules/
    - $HOME/node_moduless/
    - /home/travis/virtualenv/python2.7
before_install:
  - "export DISPLAY=:99.0"
  - "sh -e /etc/init.d/xvfb start"
install:
  - echo 'Running installation in directory $PWD'
  - # Python
  - pip install flake8 --download-cache $HOME/.pip-cache
  - pip install -r requirements.txt --download-cache $HOME/.pip-cache
  - pip install -r dev-requirements.txt --download-cache $HOME/.pip-cache

  - # JS
  - sudo add-apt-repository -y ppa:chris-lea/node.js
  - sudo apt-get -y update
  - sudo apt-get -y install nodejs google-chrome-stable
  - sudo npm install

  - # Set up Chrome webdriver for Protractor
  - ./node_modules/protractor/bin/webdriver-manager update

before_script:
  - flake8 src/
  - bower install -F

script:
  - # Python tests
  - py.test

  # Setup up JS E2E
  # ./node_modules/protractor/bin/webdriver-manager start &
  - sleep 2
  - npm test
language: python
python:
  - "2.7"
cache:

  # TODO local node modules path correct?
  directories:
    - $HOME/.pip-cache/
    - /usr/lib/node_modules/
    - $HOME/node_moduless/
    - /home/travis/virtualenv/python2.7
before_install:
  - "export DISPLAY=:99.0"
  - "sh -e /etc/init.d/xvfb start"
install:
  - echo 'Running installation in directory $PWD'
  - # Python
  - pip install flake8 --download-cache $HOME/.pip-cache
  - pip install -r requirements.txt --download-cache $HOME/.pip-cache
  - pip install -r dev-requirements.txt --download-cache $HOME/.pip-cache

  - # JS
  - sudo add-apt-repository -y ppa:chris-lea/node.js
  - sudo apt-get -y update
  - sudo apt-get -y install nodejs google-chrome-stable
  - sudo npm install

  - # Set up Chrome webdriver for Protractor
  - ./node_modules/protractor/bin/webdriver-manager update

before_script:
  - flake8 --max-complexity=10 src/
  - bower install -F

script:
  - # Python tests
  - py.test

  # Setup up JS E2E
  # ./node_modules/protractor/bin/webdriver-manager start &
  - sleep 2
  - npm test
Check McCabe complexity via Travis
Check McCabe complexity via Travis
