diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 00000000000..57ce3ebb061 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,39 @@ +sudo: required + +language: generic + +matrix: + include: + - os: linux + dist: trusty + env: PYTHON=2.7 + + - os: linux + dist: trusty + env: PYTHON=3.6 + + - os: osx + osx_image: xcode7 + env: PYTHON=2.7 + + - os: osx + osx_image: xcode7 + env: PYTHON=3.6 + + - os: linux + dist: trusty + env: LINT=1 + script: + - export PATH="$HOME/miniconda/bin:$PATH" + - flake8 . + +install: + - ./.travis/install-dependencies.sh + +script: + - export PATH="$HOME/miniconda/bin:$PATH" + + - python -m pytest modin/dataframe/test/test_dataframe.py + - python -m pytest modin/dataframe/test/test_concat.py + - python -m pytest modin/dataframe/test/test_io.py + - python -m pytest modin/dataframe/test/test_groupby.py diff --git a/.travis/install-dependencies.sh b/.travis/install-dependencies.sh new file mode 100755 index 00000000000..436368598ef --- /dev/null +++ b/.travis/install-dependencies.sh @@ -0,0 +1,62 @@ +#!/usr/bin/env bash + +ROOT_DIR=$(cd "$(dirname "${BASH_SOURCE:-$0}")"; pwd) + +echo "PYTHON is $PYTHON" + +platform="unknown" +unamestr="$(uname)" +if [[ "$unamestr" == "Linux" ]]; then + echo "Platform is linux." + platform="linux" +elif [[ "$unamestr" == "Darwin" ]]; then + echo "Platform is macosx." + platform="macosx" +else + echo "Unrecognized platform." + exit 1 +fi + +if [[ "$PYTHON" == "2.7" ]] && [[ "$platform" == "linux" ]]; then + # Install miniconda. + wget https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh -O miniconda.sh -nv + bash miniconda.sh -b -p $HOME/miniconda + export PATH="$HOME/miniconda/bin:$PATH" + pip install -q pandas==0.22 feather-format lxml openpyxl xlrd + # Install ray from its latest wheels + pip install -q -U https://s3-us-west-2.amazonaws.com/ray-wheels/latest/ray-0.4.0-cp27-cp27mu-manylinux1_x86_64.whl +elif [[ "$PYTHON" == "3.6" ]] && [[ "$platform" == "linux" ]]; then + # Install miniconda. + wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh -nv + bash miniconda.sh -b -p $HOME/miniconda + export PATH="$HOME/miniconda/bin:$PATH" + pip install -q pandas==0.22 feather-format lxml openpyxl xlrd + # Install ray from its latest wheels + pip install -q -U https://s3-us-west-2.amazonaws.com/ray-wheels/latest/ray-0.4.0-cp36-cp36m-manylinux1_x86_64.whl +elif [[ "$PYTHON" == "2.7" ]] && [[ "$platform" == "macosx" ]]; then + # Install miniconda. + wget https://repo.continuum.io/miniconda/Miniconda2-latest-MacOSX-x86_64.sh -O miniconda.sh -nv + bash miniconda.sh -b -p $HOME/miniconda + export PATH="$HOME/miniconda/bin:$PATH" + pip install -q pandas==0.22 feather-format lxml openpyxl xlrd + # Install ray from its latest wheels + pip install -q -U https://s3-us-west-2.amazonaws.com/ray-wheels/latest/ray-0.4.0-cp27-cp27m-macosx_10_6_intel.whl +elif [[ "$PYTHON" == "3.6" ]] && [[ "$platform" == "macosx" ]]; then + # Install miniconda. + wget https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -O miniconda.sh -nv + bash miniconda.sh -b -p $HOME/miniconda + export PATH="$HOME/miniconda/bin:$PATH" + pip install -q pandas==0.22 feather-format lxml openpyxl xlrd + # Install ray from its latest wheels + pip install -q -U https://s3-us-west-2.amazonaws.com/ray-wheels/latest/ray-0.4.0-cp36-cp36m-macosx_10_6_intel.whl +elif [[ "$LINT" == "1" ]]; then + # Install miniconda. + wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh -nv + bash miniconda.sh -b -p $HOME/miniconda + export PATH="$HOME/miniconda/bin:$PATH" + # Install Python linting tools. + pip install -q flake8 flake8-comprehensions +else + echo "Unrecognized environment." + exit 1 +fi