language: python
python:
  - "3.5.2"
  - "3.6.1"
# - "nightly"

#install:
#  - pip3 install codecov pyyaml
#  - pip install pyyaml
script:
  - pip list
  # Run unit tests and integration tests.
  - python -m unittest discover
  - test/integration_tests.sh
  # Run coverage.
  - |
    if [ "$TRAVIS_PYTHON_VERSION" = "3.5.2" ]; then 
      pip install codecov
      coverage run --source ofp_app -m unittest test/*.py
      test/integration_tests.sh --coverage
      codecov
    fi
  # Create source package.
  - python setup.py sdist
  # Run unit tests again from source package.
  - cd dist ; tar xvfz ofp_app-*.tar.gz ; cd ofp_app-* ; python setup.py test

#  - python3 -m doctest README.adoc
#  - coverage run --source ofp_app -m test
#after_success:
#  - if [ "$TRAVIS_PYTHON_VERSION" != "nightly" ]; then codecov; fi

before_install:
  # Install oftr from launchpad.
  - sudo add-apt-repository ppa:byllyfish/oftr -y
  - sudo apt-get update -qq
  - sudo apt-get install oftr -y
  - oftr version

# Per https://docs.travis-ci.com/user/ci-environment/#Virtualization-environments
sudo: required
dist: trusty

language: python
python:
  - "3.5.2"
  - "3.6.1"
  - "nightly"

#install:
#  - pip3 install codecov pyyaml
#  - pip install pyyaml
script:
  - pip list
  # Run unit tests and integration tests.
  - python -m unittest discover
  - test/integration_tests.sh
  # Run coverage.
  - |
    if [ "$TRAVIS_PYTHON_VERSION" = "3.5.2" ]; then 
      pip install codecov
      coverage run --source ofp_app -m unittest test/*.py
      test/integration_tests.sh --coverage
      codecov
    fi
  # Create source package.
  - python setup.py sdist
  # Run unit tests again from source package.
  - cd dist ; tar xvfz ofp_app-*.tar.gz ; cd ofp_app-* ; python setup.py test

#  - python3 -m doctest README.adoc
#  - coverage run --source ofp_app -m test
#after_success:
#  - if [ "$TRAVIS_PYTHON_VERSION" != "nightly" ]; then codecov; fi

before_install:
  # Install oftr from launchpad.
  - sudo add-apt-repository ppa:byllyfish/oftr -y
  - sudo apt-get update -qq
  - sudo apt-get install oftr -y
  - oftr version

# Per https://docs.travis-ci.com/user/ci-environment/#Virtualization-environments
sudo: required
dist: trusty

Add nightly python build (3.7 currently)
Add nightly python build (3.7 currently)
