dist: trusty
sudo: false

language: python

matrix:
  include:
    - python: 2.7
    - python: 3.6
    # The 'osx' environment uses the python2.7 by default.
    # TODO: maybe also tests python3 on macOS 
    - language: generic
      os: osx

install:
  - if [ "$TRAVIS_OS_NAME" == "osx" ]; then
      curl -O https://bootstrap.pypa.io/get-pip.py;
      python get-pip.py --user;
      python -m pip install --user virtualenv;
      python -m virtualenv .venv/;
      source .venv/bin/activate;
    fi
  - pip install -r requirements.txt
  - pip install -r dev-requirements.txt
  - pip install codacy-coverage

script:
  - make check
  - make dist
  - unzip dist/psautohint-$(python setup.py -V).zip
  - make -C psautohint-$(python setup.py -V)

after_success:
  - cd tests
  - coverage combine
  - coverage xml
  - python-codacy-coverage -r coverage.xml

dist: trusty
sudo: false

language: python

matrix:
  include:
    - python: 2.7
    - python: 3.6
    # The 'osx' environment uses the python2.7 by default.
    # TODO: maybe also tests python3 on macOS 
    - language: generic
      os: osx

install:
  - if [ "$TRAVIS_OS_NAME" == "osx" ]; then
      curl -O https://bootstrap.pypa.io/get-pip.py;
      python get-pip.py --user;
      python -m pip install --user virtualenv;
      python -m virtualenv .venv/;
      source .venv/bin/activate;
    fi
  - pip install -r requirements.txt
  - pip install -r dev-requirements.txt
  - pip install codacy-coverage

script:
  - make check
  - make dist
  - unzip dist/psautohint-$(python setup.py -V).zip
  - make -C psautohint-$(python setup.py -V)

after_success:
  - cd tests
  - coverage combine
  - coverage xml
  - sed 's/\/home\/travis\/build\/adobe-type-tools\/psautohint\/build\/*/python/' coverage.xml > coverage2.xml
  - python-codacy-coverage -r coverage2.xml

Normalize the file paths in the results
[coverage] Normalize the file paths in the results
