# if you are looking for a working example
# refer to https://github.com/randy3k/UnitTesting-example/blob/master/.travis.yml

env:
    global:
        - PACKAGE="UnitTesting"
        - SUBLIME_TEXT_VERSION="3"

matrix:
    include:
        - os: linux
          language: python
          python: 3.3
        - os: linux
          language: python
          python: 3.3
          env: PCINSTALL=true
        - os: osx
          language: generic
        - os: osx
          language: generic
          env: PCINSTALL=true

before_install:
    - if [ "$TRAVIS_OS_NAME" == "linux"  ]; then
            export DISPLAY=:99.0;
            sh -e /etc/init.d/xvfb start;
      fi

install:
    - if [ "$TRAVIS_OS_NAME" == "osx" ]; then
            brew update;
            brew install python3;
      fi
    - pip3 install flake8;
    - pip3 install flake8-docstrings;
    - sh sbin/travis.sh bootstrap
    - sh sbin/travis.sh install_color_scheme_unit
    - if [ "$PCINSTALL" == true ]; then sh sbin/travis.sh install_package_control; fi

script:
    - flake8 --statistics
    - sh sbin/travis.sh run_tests --coverage

after_success:
    - pip3 install codecov;
    - codecov

notifications:
    email:
        on_success: change
        on_failure: change

# if you are looking for a working example
# refer to https://github.com/randy3k/UnitTesting-example/blob/master/.travis.yml

env:
    global:
        - PACKAGE="UnitTesting"
        - SUBLIME_TEXT_VERSION="3"

matrix:
    include:
        - os: linux
          language: python
          python: 3.3
        - os: linux
          language: python
          python: 3.3
          env: PCINSTALL=true
        - os: osx
          language: generic
        - os: osx
          language: generic
          env: PCINSTALL=true

before_install:
    - if [ "$TRAVIS_OS_NAME" == "linux"  ]; then
            export DISPLAY=:99.0;
            sh -e /etc/init.d/xvfb start;
      fi

install:
    - if [ "$TRAVIS_OS_NAME" == "osx" ]; then
            brew update;
            brew upgrade python;
      fi
    - pip3 install flake8;
    - pip3 install flake8-docstrings;
    - sh sbin/travis.sh bootstrap
    - sh sbin/travis.sh install_color_scheme_unit
    - if [ "$PCINSTALL" == true ]; then sh sbin/travis.sh install_package_control; fi

script:
    - flake8 --statistics
    - sh sbin/travis.sh run_tests --coverage

after_success:
    - pip3 install codecov;
    - codecov

notifications:
    email:
        on_success: change
        on_failure: change

Fix Travis OSX error updating python
Fix Travis OSX error updating python

```
Error: python 2.7.14 is already installed
To upgrade to 3.6.4_3, run `brew upgrade python`
/Users/travis/.travis/job_stages: line 57: pip3: command not found
/Users/travis/.travis/job_stages: line 57: pip3: command not found
/Users/travis/.travis/job_stages: line 57: pip3: command not found
The command "if [ "$TRAVIS_OS_NAME" == "linux" ]; then pip install
flake8; pip install flake8-docstrings; pip install python-coveralls;
elif [ "$TRAVIS_OS_NAME" == "osx" ]; then brew update; brew install
python3; pip3 install flake8; pip3 install flake8-docstrings; pip3
install python-coveralls; fi" failed and exited with 127 during .
```
