Skip to content

Commit

Permalink
[CI] Adding travis config (#1)
Browse files Browse the repository at this point in the history
* [CI] Add travis config

* Make install-dependencies executable

* use anaconda in travis tests

* ensure script is executable

* fetch python 3.6 ray wheels
  • Loading branch information
kunalgosar authored Jun 22, 2018
1 parent 2604227 commit 157d85f
Show file tree
Hide file tree
Showing 2 changed files with 101 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -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
62 changes: 62 additions & 0 deletions .travis/install-dependencies.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 157d85f

Please sign in to comment.