Skip to content

Commit

Permalink
Merge pull request #42 from kivy/travis
Browse files Browse the repository at this point in the history
Add basic .travis.yml
  • Loading branch information
tito committed Nov 5, 2018
2 parents 6a2c320 + 0b7d979 commit 4aa2338
Showing 1 changed file with 66 additions and 0 deletions.
66 changes: 66 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
sudo: required

matrix:
fast_finish: true
include:
- language: generic
env: RUN=unit PY=2 HOMEBREW_NO_AUTO_UPDATE=1
os: osx

- language: generic
env: RUN=unit PY=3 HOMEBREW_NO_AUTO_UPDATE=1
os: osx

before_install:
- echo PATH=$PATH;

# uninstall old GNUpg, install new one and add Brew
# 'Cellar' folder to the path (contains binaries)
- brew uninstall gnupg
- brew install gnupg2
- sudo ln -sv /usr/local/Cellar/gnupg /usr/local/Cellar/gpg || true
- sudo ln -sv /usr/local/Cellar/gnupg /usr/local/Cellar/gpg2 || true
- export PATH=$PATH:/usr/local/Cellar

# https://github.com/travis-ci/travis-ci/issues/6307
- curl -sSL https://rvm.io/mpapis.asc | gpg --import -
- rvm get head

# use real branch name instead of detached HEAD unless PR
- if [ "$TRAVIS_PULL_REQUEST_BRANCH" == "" ]; then
git checkout $TRAVIS_BRANCH;
fi;

install:
# get Py3 because it's not present in any OSX image on Travis
- if [ "${PY}" == "3" ]; then
py3pkg=python-3.5.4rc1-macosx10.6.pkg;
curl -O -L https://www.python.org/ftp/python/3.5.4/$py3pkg;
sudo installer -package $py3pkg -target /;
fi;

# manual get-pip.py on OSX because TLS1.2+ required
# pyfound.blogspot.com/2017/01/time-to-upgrade-your-python-tls-v12.html
# and install to virtualenv
- curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
- if [ "${PY}" == "3" ]; then
sudo python3 get-pip.py;
else
sudo python get-pip.py;
fi;

- if [ "${PY}" == "3" ]; then
pip3 install --user virtualenv;
python3 -m virtualenv env;
else
pip install --user virtualenv;
python -m virtualenv env;
fi;

- source env/bin/activate;
- pip install --upgrade cython nose
- make test_lib

script:
- make
- NOSE_VERBOSE=3 make tests

0 comments on commit 4aa2338

Please sign in to comment.