Skip to content

Commit f043012

Browse files
committed
CI: Add OSX test to Travis
1 parent 29bdb59 commit f043012

File tree

1 file changed

+26
-13
lines changed

1 file changed

+26
-13
lines changed

.travis.yml

Lines changed: 26 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -57,15 +57,28 @@ matrix:
5757
- python: 3.7
5858
env:
5959
- EXTRA_PIP_FLAGS="$PRE_PIP_FLAGS"
60+
# OSX Python support is basically accidental. Take whatever version we can
61+
# get and test with full dependencies...
62+
- os: osx
63+
language: minimal
64+
# and pre-releases. No min-requirements.txt because we can't assume a wheel that old.
65+
- os: osx
66+
language: minimal
67+
env:
68+
- EXTRA_PIP_FLAGS="$PRE_PIP_FLAGS"
69+
# Test that PyPI installs from source pass
6070
- python: 3.5
6171
env:
6272
- INSTALL_TYPE=sdist
73+
# Wheels (binary distributions)
6374
- python: 3.5
6475
env:
6576
- INSTALL_TYPE=wheel
77+
# Install from git archive (e.g., https://github.com/nipy/nibabel/archive/master.zip)
6678
- python: 3.5
6779
env:
6880
- INSTALL_TYPE=archive
81+
# Run flake8... Might not be needed now we have pep8speaks
6982
- python: 3.5
7083
env:
7184
- CHECK_TYPE="style"
@@ -76,42 +89,42 @@ matrix:
7689

7790
# Set up virtual environment, build package, build from depends
7891
before_install:
79-
- travis_retry python -m pip install --upgrade pip virtualenv
80-
- virtualenv --python=python venv
92+
- travis_retry python3 -m pip install --upgrade pip virtualenv
93+
- virtualenv --python=python3 venv
8194
- source venv/bin/activate
82-
- python --version # just to check
83-
- travis_retry pip install -U $SETUP_REQUIRES
95+
- python3 --version # just to check
96+
- travis_retry python3 -m pip install -U $SETUP_REQUIRES
8497
- |
8598
if [ "$INSTALL_TYPE" == "sdist" ]; then
86-
python setup.py egg_info # check egg_info while we're here
87-
python setup.py sdist
99+
python3 setup.py egg_info # check egg_info while we're here
100+
python3 setup.py sdist
88101
export ARCHIVE=$( ls dist/*.tar.gz )
89102
elif [ "$INSTALL_TYPE" == "wheel" ]; then
90-
python setup.py bdist_wheel
103+
python3 setup.py bdist_wheel
91104
export ARCHIVE=$( ls dist/*.whl )
92105
elif [ "$INSTALL_TYPE" == "archive" ]; then
93106
export ARCHIVE="package.tar.gz"
94107
git archive -o $ARCHIVE HEAD
95108
fi
96-
- if [ -n "$DEPENDS" ]; then pip install $EXTRA_PIP_FLAGS $DEPENDS; fi
109+
- if [ -n "$DEPENDS" ]; then python3 -m pip install $EXTRA_PIP_FLAGS $DEPENDS; fi
97110

98111
# command to install dependencies
99112
install:
100113
- |
101114
if [ "$INSTALL_TYPE" == "setup" ]; then
102-
python setup.py install
115+
python3 setup.py install
103116
else
104-
pip install $EXTRA_PIP_FLAGS $ARCHIVE
117+
python3 -m pip install $EXTRA_PIP_FLAGS $ARCHIVE
105118
fi
106119
# Basic import check
107-
- python -c 'import nibabel; print(nibabel.__version__)'
120+
- python3 -c 'import nibabel; print(nibabel.__version__)'
108121
- if [ "$CHECK_TYPE" == "skiptests" ]; then exit 0; fi
109122

110123
before_script:
111124
# Point to nibabel data directory
112125
- export NIBABEL_DATA_DIR="$PWD/nibabel-data"
113126
# Because nibabel is already installed, will just look up the extra
114-
- pip install $EXTRA_PIP_FLAGS "nibabel[$CHECK_TYPE]"
127+
- python3 -m pip install $EXTRA_PIP_FLAGS "nibabel[$CHECK_TYPE]"
115128

116129
# command to run tests, e.g. python setup.py test
117130
script:
@@ -134,7 +147,7 @@ script:
134147
fi
135148
136149
after_script:
137-
- travis_retry pip install codecov
150+
- travis_retry python3 -m pip install codecov
138151
- codecov
139152

140153
notifications:

0 commit comments

Comments
 (0)