# NOTE: As of July 2019, Python builds are *not* available for macOS on Travis CI!
# https://docs.travis-ci.com/user/languages/python/

dist: xenial

language: cpp
compiler: gcc

os:
  - linux

language: python
# we want to run the build & unit tests (as specified under "script" below)
# for each of Python 3.5, 3.6, and 3.7
python:
  - "3.5"
  - "3.6"
  - "3.7"


# command to install dependencies
install:
  - pip install -r requirements.txt
  # install astropy so we can run tests
  - pip install astropy

# command to run tests
script:
  #  Travis CI peculiarity: install in develop mode, otherwise imports will not work!
  - pip install -e .
  - python -c "import pyimfit"
  # note that the tests require astropy be installed
  - cd pyimfit/tests ; pytest
