language: python
sudo: true
python:
  - "2.7_with_system_site_packages"
  # - "3.5" #python3-gi is bugged and Travis not let to access to python-gi (py2.7)

before_script:
  - "export DISPLAY=:99.0"
  - "sh -e /etc/init.d/xvfb start"
  - sleep 3

install:
  - bash test/setup_test.sh

script:
  # so to help eventual debug: knowing what exact versions are in use can be rather useful.
  - pip freeze
  # Code static analysis
  - pep8 --max-line-length=100 --exclude='*.pyc, *.cfg, *.log' --ignore='E402' alignak_app/*
  #- pylint --rcfile=.pylintrc alignak_webui/
  # No pep257 currently (Code doc compliance)
  # - pep257 --select=D300 alignak_webui
  # Code dynamic analysis
  # - cd test
  - coverage erase
  - cd test/
  - nosetests -xv --nologcapture --with-coverage --cover-package=alignak_app test_*.py
  - coverage combine
  - coverage report -m
  # - cd ..

# specific call to launch coverage data into coveralls.io
after_success:
  # to get coverage data with relative paths and not absolute we have to
  # execute coveralls from the base directory of the project,
  # so we need to move the .coverage file here :
  # mv test/.coverage . && coveralls --rcfile=test/.coveragerc -v
  coveralls -v
  

language: python
sudo: true
python:
  - "2.7_with_system_site_packages"
  # - "3.5" #python3-gi is bugged and Travis not let to access to python-gi (py2.7)

before_script:
  - "export DISPLAY=:99.0"
  - "sh -e /etc/init.d/xvfb start"
  - sleep 3

install:
  - bash test/setup_test.sh

script:
  # so to help eventual debug: knowing what exact versions are in use can be rather useful.
  - pip freeze
  # Code static analysis
  - pep8 --max-line-length=100 --exclude='*.pyc, *.cfg, *.log' --ignore='E402' alignak_app/*
  #- pylint --rcfile=.pylintrc alignak_webui/
  # No pep257 currently (Code doc compliance)
  # - pep257 --select=D300 alignak_webui
  # Code dynamic analysis
  # - cd test
  - coverage erase
  - cd test/
  - nosetests -xv --nologcapture --with-coverage --cover-package=alignak_app test_*.py
  - ls -la
  - coverage combine
  - coverage report -m
  # - cd ..

# specific call to launch coverage data into coveralls.io
after_success:
  # to get coverage data with relative paths and not absolute we have to
  # execute coveralls from the base directory of the project,
  # so we need to move the .coverage file here :
  # mv test/.coverage . && coveralls --rcfile=test/.coveragerc -v
  coveralls -v
  

Add listing test folder to see if coverage exist
Add listing test folder to see if coverage exist
