luk036/n-sphere

View on GitHub
.travis.yml

Summary

Maintainability
Test Coverage
# Travis configuration file using the build matrix feature
# Read more under http://docs.travis-ci.com/user/build-configuration/
# THIS SCRIPT IS SUPPOSED TO BE AN EXAMPLE. MODIFY IT ACCORDING TO YOUR NEEDS!

sudo: false
language: python
virtualenv:
  system_site_packages: false
matrix:
  fast_finish: true
  include:
    - python: 3.6
      env: DISTRIB="ubuntu" TOX_PYTHON_VERSION="py36" COVERAGE="true"
    - env: DISTRIB="conda" PYTHON_VERSION="3.6" COVERAGE="false"
install:
  - source tests/travis_install.sh
  - pip install -r requirements.txt
  # ^  DEPRECATION WARNING:
  # The automatic creation of a `requirements.txt` file is deprecated.
  # See `Dependency Management` in the docs for other options.
before_script:
  - git config --global user.email "luk036@gmail.com"
  - git config --global user.name "Wai-Shing Luk"
script:
  - python setup.py develop
  - tox
  - |
    if [[ "$COVERAGE" == "true" ]]; then
      python setup.py test --addopts --cov=src/
    fi
after_success:
  - |
    if [[ "$COVERAGE" == "true" ]]; then
      codecov || echo "failed"
    fi
after_script:
  - travis-cleanup
cache:
  pip: true
  directories:
    - $HOME/miniconda

notifications:
  email: false
  slack:
    rooms:
      - loksu:jErzuILLSNn9qGYkkILvBwje#n-sphere