Skip to content

Commit

Permalink
💚 test with python3 in travis, with non-conda setup
Browse files Browse the repository at this point in the history
  • Loading branch information
kba committed Jan 4, 2019
1 parent 3ff4cd6 commit 3c36720
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 38 deletions.
45 changes: 9 additions & 36 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,49 +1,22 @@
language: python
python:
# This is not actually used. Because it would take an overly long time
# to build scipy we cannot use the virtual env of travis. Instead, we
# use miniconda.
- "2.7"
- "3.4"
- "3.5"
- "3.6"
- "3.7-dev"

sudo: false

cache:
directories:
- $HOME/.cache/matplotlib
- $HOME/.cache/pip
- models

install:
# Install miniconda
# -----------------
- if [[ "$TRAVIS_PYTHON_VERSION" == 2* ]]; then
wget http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh;
else
wget http://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
fi
- bash miniconda.sh -b -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$PATH"

# Create the basic testing environment
# ------------------------------------
- conda config --set always_yes yes --set changeps1 no --set show_channel_urls yes
- conda update conda
- conda create -n test-environment python=$TRAVIS_PYTHON_VERSION
- source activate test-environment

# Customise the testing environment
# ---------------------------------
- conda install --file requirements.txt

# Conda debug
#-----------
- conda list

# Install ocropy
# --------------
- wget -O models/en-default.pyrnn.gz http://www.tmbdev.net/en-default.pyrnn.gz
- python setup.py install
- cd models && wget -nc http://www.tmbdev.net/en-default.pyrnn.gz
- pip install .

script:
- mkdir ../test_folder
- cd ../test_folder
- ../ocropy/tests/run-unit
- ../ocropy/run-test-ci
- ./run-test-ci
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
numpy>=1.15.2
scipy>=1.2.0
numpy>=1.15.4
scipy>=1.1.0
matplotlib>=2.2.3
imageio>=2.4.1
Pillow>=2.7.0
Expand Down

0 comments on commit 3c36720

Please sign in to comment.