bidict/.travis.yml

120 lines
3.4 KiB
YAML
Raw Normal View History

language: generic
2016-06-28 04:05:22 +00:00
env:
global:
- PYENV_ROOT="$HOME/.pyenv"
- PYENV="$PYENV_ROOT/bin/pyenv"
matrix:
include:
# One-off jobs. Override "script" to do something other than run pytest.
# Use latest CPython 3 for these. Set a "TASK" var so the task is evident in the build matrix.
- script: ./build-docs.sh linkcheck
env:
- TASK=build-docs
- PYENV_PYTHON_VER=3.6.3
- script: pylint bidict tests/*.py
env:
- TASK=pylint
- PYENV_PYTHON_VER=3.6.3
- script: flake8 bidict tests/*.py
env:
- TASK=flake8
- PYENV_PYTHON_VER=3.6.3
- script: pydocstyle bidict
2017-06-12 15:24:22 +00:00
env:
- TASK=pydocstyle
- PYENV_PYTHON_VER=3.6.3
# Test all supported Python versions on macOS...
- os: osx
env: PYENV_PYTHON_VER=2.7.14
- os: osx
env: PYENV_PYTHON_VER=3.4.7
- os: osx
env: PYENV_PYTHON_VER=3.5.3
- os: osx
env: PYENV_PYTHON_VER=3.6.3
- os: osx
env: PYENV_PYTHON_VER=3.7-dev
- os: osx
env: PYENV_PYTHON_VER=pypy2.7-5.9.0
# not yet working on macOS? works on linux:
#- os: osx
#- env: PYENV_PYTHON_VER=pypy3.5-5.9.0
# ...and Linux.
- env: PYENV_PYTHON_VER=2.7.14
- env: PYENV_PYTHON_VER=3.4.7
- env: PYENV_PYTHON_VER=3.5.3
# Enable coverage just for the latest stable Python 3 version on Linux.
- env: PYENV_PYTHON_VER=3.6.3
script:
- py.test --cov=bidict --cov-config=.coveragerc
- travis_retry pip install coveralls && coveralls
- env: PYENV_PYTHON_VER=3.7-dev
- env: PYENV_PYTHON_VER=pypy2.7-5.9.0
- env: PYENV_PYTHON_VER=pypy3.5-5.9.0
before_install:
- |
git --no-pager log -n2
echo "TRAVIS_PULL_REQUEST_SHA: $TRAVIS_PULL_REQUEST_SHA"
echo "TRAVIS_COMMIT: $TRAVIS_COMMIT"
2014-09-23 14:08:21 +00:00
install:
# based on https://github.com/frol/flask-restplus-server-example/blob/018f48e5/.travis.yml
- |
set -e
if [[ -n "$PYENV_PYTHON_VER" ]]; then
if [[ -f "$PYENV" ]]; then
pushd "$PYENV_ROOT" && git pull && popd
else
rm -rf "$PYENV_ROOT" && git clone --depth 1 https://github.com/yyuu/pyenv.git "$PYENV_ROOT"
fi
"$PYENV" install --skip-existing "$PYENV_PYTHON_VER"
export PYTHON="$PYENV_ROOT/versions/$PYENV_PYTHON_VER/bin/python"
2017-03-25 21:42:59 +00:00
$PYTHON -m ensurepip --upgrade
$PYTHON -m pip install --upgrade virtualenv
export VENV="$HOME/virtualenvs/$PYENV_PYTHON_VER"
2017-03-25 21:42:59 +00:00
$PYTHON -m virtualenv --python="$PYTHON" "$VENV"
source "$VENV/bin/activate"
fi
travis_retry pip install -e .[test]
2014-09-23 14:08:21 +00:00
script:
- py.test
before_cache:
- rm -rf $HOME/.cache/pip/log
cache:
directories:
- $HOME/.cache/pip
2016-06-28 04:05:22 +00:00
- $HOME/.hypothesis
- $PYENV_ROOT
sudo: false
notifications:
webhooks:
urls:
- https://webhooks.gitter.im/e/bf64fb45a633c0935b9b
email:
recipients: jab@math.brown.edu
deploy:
- provider: pypi
user: jab
password:
secure: B9LLgXkTbtjeC/IbH4wh9PEBzvKEAuYo3EBNW5f1xuLqVqtsysIyxJa5ar/FQ4qwUCBwZPFAXFurN3lLzRhb2Tc04YQ0GYVv6f8lkzwrjoWau4iB9Qt/nnvdRa7KryEJvtenHCAnwoEUaADCjkZjwo6fIA0hEOLB6/AYfhfgXYA=
on:
tags: true
# https://docs.travis-ci.com/user/deployment/releases/
- provider: releases
api_key:
secure: 02GCTV4ja1dWQqzIznOdvVdJfEcIIougCv2OsQapDr6KjtgzpcBvDC4Z57eDsZX2JwharKdz3CmYJaRLCIDkVCYiyBxovO6v8o4Kww21v/4KMkpBmoGQmn9WiR1NYiK+dxlQb59+9t/DTYT39Wq6ZD+3sCETRdRZgraMNZWr8sA=
on:
tags: true