language: python
python:
  # https://github.com/travis-ci/travis-ci/issues/2219#issuecomment-41804942
  # https://snarky.ca/how-to-use-your-project-travis-to-help-test-python-itself/
  - "2.7"
  - "3.5"
  - "3.5-dev"
  - "3.6"
  - "3.6-dev"
  - "3.7"
  - "3.7-dev"
  - "3.8"
  - "3.8-dev"
  - "nightly"

before_install:
  # install dependencies for NumPy
  - sudo apt-get update -qq
  - sudo apt-get install -qq gfortran libatlas-base-dev
  - sudo apt-get install -qq python-numpy

install:
  - pip install -U pip wheel setuptools
  - pip install -U pytest codecov pytest-cov
  - python setup.py install
  - pip install -U tinysegmenter jieba konlpy
  - python -c "import nltk; nltk.download('punkt')"

script: pytest tests

after_success:
  - codecov

language: python
os: linux
cache: pip

matrix:
  include:
    - name: "Python 2.7 on Linux"
      python: 2.7
    - name: "Python 3.5 on Linux"
      python: 3.5
    - name: "Python 3.6 on Linux"
      python: 3.6
    - name: "Python 3.7 on Linux"
      python: 3.7
    - name: "Python 3.8 on Linux"
      dist: xenial
      python: 3.8
    # https://github.com/travis-ci/travis-ci/issues/2219#issuecomment-41804942
    # https://snarky.ca/how-to-use-your-project-travis-to-help-test-python-itself/
    - name: "Python 3.9 Nightly on Linux"
      dist: bionic
      python: nightly
    - name: "Pypy 3 on Linux"
      python: pypy3
    - name: "Python 3 on older macOS"
      os: osx
      osx_image: xcode9.4
      language: shell
      before_install:
        - sw_vers
        - python3 --version
        - pip3 --version
    - name: "Python 3 on macOS"
      os: osx
      osx_image: xcode11
      language: shell
      before_install:
        - sw_vers
        - python3 --version
        - pip3 --version
  allow_failures:
    - python: nightly
    - python: pypy3
    - os: osx

before_install:
  # install dependencies for NumPy
  - sudo apt-get update -qq
  - sudo apt-get install -qq gfortran libatlas-base-dev

install:
  - pip install -U pip wheel setuptools
  - python setup.py install
  - pip install -U numpy tinysegmenter jieba konlpy
  - python -c "import nltk; nltk.download('punkt')"
  - pip install -U pytest codecov pytest-cov

script: pytest tests

after_success:
  - codecov

Add testing matrix for TravisCI
Add testing matrix for TravisCI
