niccokunzmann/ObservableList

View on GitHub
.travis.yml

Summary

Maintainability
Test Coverage
language: python
sudo: required
python:
# Python versions 2.3, 2.4, 2.5, 3.1, 3.2, 3.6 do not exist on travis.
- '2.6'
- '2.7'
- '3.3'
- '3.4'
- '3.5'
before_install:
- pip install --upgrade pip
install:
# install the package
- PACKAGE_VERSION=`python setup.py --version`
- TAG_NAME=v$PACKAGE_VERSION
# install from the zip file to see if files were forgotten
- python setup.py sdist --dist-dir=dist --formats=zip
- ( cd dist ; pip install ObservableList-${PACKAGE_VERSION}.zip )
# install the test requirements
- pip install -r test-requirements.txt
- IS_PYTHON2="`python -c 'import sys;print(sys.version_info[0] == 2)'`"
- IS_PYTHON26="`python -c 'import sys;print(sys.version_info[:2] == (2, 6))'`"
- if ! python -c "import unittest.mock" 2> /dev/null ; then pip install mock==2.0.0 ; fi
before_script:
# remove the build folder because it creates problems for py.test
- rm -rf build
# show the versions
- python setup.py --version
- py.test --version
- python setup.py requirements
- echo Package version $PACKAGE_VERSION with possible tag name $TAG_NAME
script:
# test with pep8
# add coverage for python 3.3 and above
- if [ "$IS_PYTHON26" == "False" ] ; then py.test --cov=ObservableList --pep8 ; fi
# run tests from installation and test import form everywhere
- "( cd / && py.test --pyargs ObservableList )"
# test that the tag represents the version
# https://docs.travis-ci.com/user/environment-variables/#Default-Environment-Variables
- ( if [ -n "$TRAVIS_TAG" ]; then if [ $TAG_NAME != $TRAVIS_TAG ]; then echo "This tag is for the wrong version. Got \"$TRAVIS_TAG\" expected \"$TAG_NAME\"."; exit 1; fi; fi; )
after_script:
# https://github.com/codeclimate/python-test-reporter
# set the environment variable CODECLIMATE_REPO_TOKEN in travis-ci settings
- if [ "$IS_PYTHON2" == "False" ] ; then codeclimate-test-reporter ; fi
before_deploy:
# create the documentation
- ( cd docs ; make html )
- pip install wheel
deploy:
# created with travis command line tool
# https://docs.travis-ci.com/user/deployment/pypi
# $ travis setup pypi
  provider: pypi
  user: niccokunzmann2
  password:
      secure: "Zh0kIy2mk2+ZOmQwpoO/NKNgkvXaflCxNYueFHR8dCQ/JXQzBjDV4C8Q05oxvnAfzwbMHL/xTMpJaJ3ZUd+CKJBigKkDWSSn+6WL4mRcEtN8csjiII8SYNy+gJze6gZ1zFhULmYhLCMpV/VgWv3fvtYoCpjb55CGn84YgE6HdeIYhTITkdEkOfnPLPEbIjArOxFvhGaIvLzrFUwaI0FMR/5ueKgLgnC9P1FI1/RJzJa3/ibjStsOH08gERZ7xxKgYsdqOBtpi7pL9FzSuW5urRsq2JepSlDml5zXg6XjKP4klwKjVDyVc0O7FmEeFd6KNtnRgRSSC6ZnyD5eSLgOisOp5e4EW828qi7ce4nLp6/z6nXqGmMRV9copTXFSuVQA1tXWGsGUs6Sy3DMcxuroQLg3mWsdn+Mdm9GoND1quiGHhZwQbCO8oeSjCsWTwv2FV9j38N7mMr6eId6WMOEMiZnoUz5PuB31w8ADhNY8ga9TbXA2dwQq0iRDsoAeuEPRaMD3IMiZq0kPfgX8hFWbwLCmRoPBzS4w/DDxn7O+7PTv602roiNrMrcITNJWVfrskaUQm+bxoX0iUaAtvq9pjzmEHKOFPtFH621D2BUux8fapZvm4EII9YRgz9nnzOBmHDtJS0mL3VDpP9VMHBROKbfDCo2gfiggED9xx/dbng="
  on:
    tags: true
    distributions: sdist bdist_wheel
    repo: niccokunzmann/ObservableList