fossasia/AYABInterface

View on GitHub
.travis.yml

Summary

Maintainability
Test Coverage
language: python
cache: pip
sudo: required
python:
- '3.3'
- '3.4'
- '3.5'
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 AYABInterface-${PACKAGE_VERSION}.zip )
# install the test requirements
- pip install -r test-requirements.txt
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
- py.test --cov=AYABInterface --pep8 --flakes AYABInterface docs
# test import form everywhere
- ( cd / && python -c "import AYABInterface;print(\"imported\")" )
# run tests from installation
- "( cd / && py.test --pyargs AYABInterface )"
# 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
- codeclimate-test-reporter
before_deploy:
# create the documentation
- ( cd docs ; make html )
- pip install wheel
- python setup.py bdist_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: h66ad1+7YfosomKf/4EqscrudC2YXTaMhHvQk4QLwj7CeBOSjJNxYjGsf0aALlk7HnpfvJ9zR/pIckZwzfgO1NQulEmh6hf1Hf2c5/qCyfdVNciVbhu9wxnlL1TGMMGAajGyNW/HTPXAAhmSNJdt+ntg+ItM0Nz6wU1OFQqne/kAT+GwuL8pRba/eviSCSlY5BNHQdjMFdqywWgHA3Y7tX5vgeUbmzR3QKPYLA/uxHqyA+V229nF8MwULp1UnxLzyU9by2Vw3dXB2+OA3ZSAt8N+Hw1mPrbttVd2ldpW1hwy2AKAuzciLpmMcf2vzMr0rx0nDLr/qVCwUy57YI8Rm1SDxfwMWuL/Nuc6iE1WQN0Y/e4hX5g4hYyA8ekfM+eMbHZcXXMKRoN2wJTeMS4Hamlv6nfPCw8vY0EAiJlBksST/0EfWk4EaYXRw38os+t7tNuJFlzvCMYl+4H5G2pOhKrjbbgxy/E+BxesY/IM0uwE5EQHCg/rzzr/samFPGT558p8zHPfvifbgOtFs0PuqbKuusq2FctSnazOwYYIaMPvDSVhWMzS0e1meWXvLnzDbWDicEiuWnm6cT3j3x2tnj/p/XUBBkl0Qxxgxj8y0XToHxw7QzYkmR4LVeQ/pzbt7REmkBTM/h9OsK2BEJKicXtvxQNNoEPamHr/odTrHL8=
  on:
    tags: true
    distributions: sdist bdist_wheel
    repo: fossasia/AYABInterface