Skip to content

Commit

Permalink
Merge pull request aboutcode-org#11 from jimc404/ci-test-suite
Browse files Browse the repository at this point in the history
Added config to run CI tests on travis
  • Loading branch information
steven-esser authored Mar 27, 2020
2 parents 4d44c6a + 7469168 commit 44fc169
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
language: python


matrix:
include:
- os: linux
python: 3.5
- os: linux
python: 3.6
- os: linux
python: 3.7
- os: linux
python: 3.8
- os: osx
language: generic
env: PYTHON_VERSION=3.6.0
- os: osx
language: generic
env: PYTHON_VERSION=3.7.0
- os: osx
language: generic
env: PYTHON_VERSION=3.8.0


install:
- |
# Manually installing pyenv and the required python version as travis does not support python builds on MacOS
if [ "$TRAVIS_OS_NAME" == "osx" ]; then
brew update
brew install pyenv
eval "$(pyenv init -)"
pyenv install --skip-existing $PYTHON_VERSION
pyenv global $PYTHON_VERSION
pyenv shell $PYTHON_VERSION
pip install -U pip setuptools wheel py
fi
pip install -r requirements.txt
script:
python -m pytest


cache:
directories:
# Caching homebrew and pyenv directories to reduce build time (as they add several minutes otherwise)
- $HOME/Library/Caches/Homebrew
- /usr/local/Homebrew
- $HOME/.pyenv/versions


before_cache:
- if [ "${TRAVIS_OS_NAME}" = "osx" ]; then brew cleanup; fi

0 comments on commit 44fc169

Please sign in to comment.