language: python

dist: trusty
sudo: false

matrix:
  fast_finish: true
  include:
    - python: 2.7
      env:
      - TOX_ENV=py27
    - python: 3.5
      env:
      - TOX_ENV=py35
    - python: 3.6
      env:
      - TOX_ENV=py36
    - python: 3.7
      env:
      - TOX_ENV=py37

install:
  - travis_retry pip install "virtualenv<14.0.0" "tox>=1.9" "coverage<4"

  # Emacs Version Manager
  - curl -fsSkL https://gist.github.com/rejeep/ebcd57c3af83b049833b/raw | sed 's/24\.3/24\.4/g' > x.sh && source ./x.sh
script:
  - travis_wait tox -e $TOX_ENV
  - emacs --version
  - emacs -Q --batch -L emacs-live-py-mode --eval '(setq byte-compile-error-on-warn t)' -f batch-byte-compile emacs-live-py-mode/*.el
  - emacs -Q -nw -L emacs-live-py-mode -L plugin/PySrc -l live-py-mode.el -l live-py-test.el -f ert-run-tests-batch-and-exit

after_success:
  - pip install codecov
  - codecov -e TOX_ENV

language: python

dist: trusty
sudo: false

matrix:
  fast_finish: true
  include:
    - python: 2.7
      env:
      - TOX_ENV=py27
    - python: 3.5
      env:
      - TOX_ENV=py35
    - python: 3.6
      env:
      - TOX_ENV=py36
    - python: 3.7
      dist: xenial
      env:
      - TOX_ENV=py37

install:
  - travis_retry pip install "virtualenv<14.0.0" "tox>=1.9" "coverage<4"

  # Emacs Version Manager
  - curl -fsSkL https://gist.github.com/rejeep/ebcd57c3af83b049833b/raw | sed 's/24\.3/24\.4/g' > x.sh && source ./x.sh
script:
  - travis_wait tox -e $TOX_ENV
  - emacs --version
  - emacs -Q --batch -L emacs-live-py-mode --eval '(setq byte-compile-error-on-warn t)' -f batch-byte-compile emacs-live-py-mode/*.el
  - emacs -Q -nw -L emacs-live-py-mode -L plugin/PySrc -l live-py-mode.el -l live-py-test.el -f ert-run-tests-batch-and-exit

after_success:
  - pip install codecov
  - codecov -e TOX_ENV

Switch Python 3.7 to run on Xenial distribution.
Switch Python 3.7 to run on Xenial distribution.
