From 7469168dfc9378d86b6793646fa33916440da0fb Mon Sep 17 00:00:00 2001 From: Mayank Chandra <32404847+jimc404@users.noreply.github.com> Date: Sun, 8 Mar 2020 23:39:06 +0530 Subject: [PATCH] Added travis config to run the test suite --- .travis.yml | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 00000000..83bae681 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,53 @@ +language: python + + +matrix: + include: + - os: linux + python: 3.5 + - os: linux + python: 3.6 + - os: linux + python: 3.7 + - os: linux + python: 3.8 + - os: osx + language: generic + env: PYTHON_VERSION=3.6.0 + - os: osx + language: generic + env: PYTHON_VERSION=3.7.0 + - os: osx + language: generic + env: PYTHON_VERSION=3.8.0 + + +install: + - | + # Manually installing pyenv and the required python version as travis does not support python builds on MacOS + if [ "$TRAVIS_OS_NAME" == "osx" ]; then + brew update + brew install pyenv + eval "$(pyenv init -)" + pyenv install --skip-existing $PYTHON_VERSION + pyenv global $PYTHON_VERSION + pyenv shell $PYTHON_VERSION + pip install -U pip setuptools wheel py + fi + pip install -r requirements.txt + + +script: + python -m pytest + + +cache: + directories: + # Caching homebrew and pyenv directories to reduce build time (as they add several minutes otherwise) + - $HOME/Library/Caches/Homebrew + - /usr/local/Homebrew + - $HOME/.pyenv/versions + + +before_cache: + - if [ "${TRAVIS_OS_NAME}" = "osx" ]; then brew cleanup; fi