forked from aboutcode-org/fetchcode
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request aboutcode-org#11 from jimc404/ci-test-suite
Added config to run CI tests on travis
- Loading branch information
Showing
1 changed file
with
53 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |