.travis.yml - Travis CI configuration

See https://docs.travis-ci.com/user/multi-os/.

os: linux

See https://docs.travis-ci.com/user/languages/python.

language: python
python:
  - 3.9
  - 3.8
 

before_install: Perform the manual steps on OS X to install python3 and activate venv, since Python support is not available, per the list of unsupported languages on OS X. The following approach is based on a workaround. This was modified based on instructions to install multiple Python versions on OS X. See also the pyenv docs.

before_install:

Install graphviz on Linux.

  - sudo apt-get -y install graphviz

install:

Make sure we’re using the latest version of pip. Use the approach which Appveyor requires to keep the CI files as close as possible.

  - python -m pip install -U pip
 

See here.

  - pip install -e .[test]
 

Run the tests.

script:
  - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then source terryfy/test_tools.sh; fi

On OS X, py.test with no parameters runs all CodeChat tests, then discovers others that fail. Try to avoid this. Also, invoking py.test refers to the system Python. So, run it as a module to use the selected Python 3 version.

  - python -m pytest ./test