mirror of
https://github.com/wassname/scikit-image.git
synced 2026-08-11 11:25:30 +08:00
Test on OSX
This commit is contained in:
@@ -1,11 +1,16 @@
|
||||
#!/usr/bin/env bash
|
||||
set -ex
|
||||
|
||||
export WHEELHOUSE="--no-index --trusted-host travis-wheels.scikit-image.org \
|
||||
--find-links=http://travis-wheels.scikit-image.org/"
|
||||
|
||||
export COVERALLS_REPO_TOKEN=7LdFN9232ZbSY3oaXHbQIzLazrSf6w2pQ
|
||||
export PIP_DEFAULT_TIMEOUT=60
|
||||
sh -e /etc/init.d/xvfb start
|
||||
|
||||
if [[ "$TRAVIS_OS_NAME" != "osx" ]]; then
|
||||
sh -e /etc/init.d/xvfb start
|
||||
export WHEELHOUSE="--no-index --trusted-host travis-wheels.scikit-image.org \
|
||||
--find-links=http://travis-wheels.scikit-image.org/"
|
||||
fi
|
||||
|
||||
export DISPLAY=:99.0
|
||||
export PYTHONWARNINGS="d,all:::skimage"
|
||||
export TEST_ARGS="--exe --ignore-files=^_test -v --with-doctest \
|
||||
|
||||
Executable
+16
@@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
brew update
|
||||
brew install ccache
|
||||
brew tap caskroom/cask
|
||||
brew cask install basictex
|
||||
|
||||
export PATH="$PATH:/Library/TeX/texbin"
|
||||
sudo tlmgr update --self
|
||||
sudo tlmgr install ucs dvipng anyfontsize
|
||||
|
||||
git clone https://github.com/MacPython/terryfy.git ~/terryfy
|
||||
source ~/terryfy/travis_tools.sh
|
||||
get_python_environment macpython $TRAVIS_PYTHON_VERSION ~/macpython_venv
|
||||
source ~/macpython_venv/bin/activate
|
||||
pip install virtualenv
|
||||
|
||||
+16
-12
@@ -3,6 +3,20 @@ set -ex
|
||||
|
||||
PY=$TRAVIS_PYTHON_VERSION
|
||||
|
||||
# Matplotlib settings - do not show figures during doc examples
|
||||
if [[ $MINIMUM_REQUIREMENTS == 1 || $TRAVIS_OS_NAME == "osx" ]]; then
|
||||
MPL_DIR=$HOME/.matplotlib
|
||||
else
|
||||
MPL_DIR=$HOME/.config/matplotlib
|
||||
fi
|
||||
|
||||
mkdir -p $MPL_DIR
|
||||
touch $MPL_DIR/matplotlibrc
|
||||
|
||||
if [[ $TRAVIS_OS_NAME == "osx" ]]; then
|
||||
echo 'backend : Template' > $MPL_DIR/matplotlibrc
|
||||
fi
|
||||
|
||||
section "Test.with.min.requirements"
|
||||
nosetests $TEST_ARGS skimage
|
||||
section_end "Test.with.min.requirements"
|
||||
@@ -56,16 +70,6 @@ section_end "Install.optional.dependencies"
|
||||
|
||||
|
||||
section "Run.doc.examples"
|
||||
|
||||
# Matplotlib settings - do not show figures during doc examples
|
||||
if [[ $MINIMUM_REQUIREMENTS == 1 ]]; then
|
||||
MPL_DIR=$HOME/.matplotlib
|
||||
else
|
||||
MPL_DIR=$HOME/.config/matplotlib
|
||||
fi
|
||||
|
||||
mkdir -p $MPL_DIR
|
||||
touch $MPL_DIR/matplotlibrc
|
||||
echo 'backend : Template' > $MPL_DIR/matplotlibrc
|
||||
|
||||
|
||||
@@ -96,7 +100,7 @@ elif [[ $WITH_PYSIDE == 1 ]]; then
|
||||
MPL_QT_API=PySide
|
||||
export QT_API=pyside
|
||||
fi
|
||||
if [ "$WITH_QT" = "1" -o "$WITH_PYSIDE" = "1" ]; then
|
||||
if [[ $WITH_QT == 1 || $WITH_PYSIDE == 1 ]]; then
|
||||
echo 'backend: Qt4Agg' > $MPL_DIR/matplotlibrc
|
||||
echo 'backend.qt4 : '$MPL_QT_API >> $MPL_DIR/matplotlibrc
|
||||
fi
|
||||
@@ -107,7 +111,7 @@ section_end "Run.doc.applications"
|
||||
section "Test.with.optional.dependencies"
|
||||
|
||||
# run tests again with optional dependencies to get more coverage
|
||||
if [ $OPTIONAL_DEPS == 1 ]; then
|
||||
if [[ $OPTIONAL_DEPS == 1 ]]; then
|
||||
TEST_ARGS="$TEST_ARGS --with-cov --cover-package skimage"
|
||||
fi
|
||||
nosetests $TEST_ARGS
|
||||
|
||||
Reference in New Issue
Block a user