wafo-project/pywafo

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/
# and https://conda.io/docs/user-guide/tasks/use-conda-with-travis-ci.html
# THIS SCRIPT IS SUPPOSED TO BE AN EXAMPLE. MODIFY IT ACCORDING TO YOUR NEEDS!
dist: xenial
sudo: false
language: python
python:
  # We don't actually use the Travis Python, but this keeps it organized.
  - 3.5
  - 3.6
  - 3.7

matrix:
  include:
    - python: 3.8
      sudo: true

services:
    - xvfb

notifications:
  email: false
 
# Setup anaconda
before_install:
  - wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
  - bash miniconda.sh -b -p $HOME/miniconda
  - export PATH="$HOME/miniconda/bin:$PATH"
  - hash -r
  - conda config --set always_yes yes --set changeps1 no
  - conda update -q conda
  # Useful for debugging any issues with conda
  - conda info -a
#  - conda install conda-build
  - conda create -q -n condaenv python=$TRAVIS_PYTHON_VERSION
  - conda install -n condaenv pip
  - conda config --add channels conda-forge
  - conda config --add channels https://conda.anaconda.org/pbrod
  - source activate condaenv
  - sudo apt-get update
  - sudo apt-get install gfortran
# Install packages
install:
  - conda install python=$TRAVIS_PYTHON_VERSION numpy scipy nose pytest matplotlib pytest-pep8 pytest-cov mpmath pillow numba statsmodels
  - pip install funcsigs
  - pip install numdifftools
  - pip install coveralls
  - pip install codecov
  - python setup.py build
  - python setup.py install
#  - conda build conda_recipe
#  - conda install wafo --use-local
before_script:
#  - "export DISPLAY=:99.0"
#  - "sh -e /etc/init.d/xvfb start"
#  - sleep 3 # give xvfb some time to start
  - git fetch --unshallow --quiet
  - git config --global user.email "per.andreas.brodtkorb@gmail.com"
  - git config --global user.name "pbrod"
script:
   # - coverage run --source=wafo setup.py test
   - coverage run --source=wafo -m py.test build/lib.linux-x86_64-$TRAVIS_PYTHON_VERSION
#   - py.test wafo --cov --pep8 --doctest-modules
# see http://www.camillescott.org/2016/07/15/travis-pytest-scipyconf/
   - coverage xml -o coverage.xml
after_success:
  - coveralls
  - codecov
cache:
  - apt