Skip to content

Commit

Permalink
Added travis, appveyor and codecov
Browse files Browse the repository at this point in the history
  • Loading branch information
raphaelvallat committed Oct 16, 2018
1 parent ad5b053 commit 26fabc1
Show file tree
Hide file tree
Showing 4 changed files with 119 additions and 0 deletions.
69 changes: 69 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
language: python

sudo: false
dist: trusty
python:
- '3.6'

matrix:
include:
- env: TEST=standard
os: linux
- env: TEST=flake
os: linux

allow_failures:
- env: TEST=flake

before_install:
# Instal miniconda3 :
- if [ "${TRAVIS_OS_NAME}" == "linux" ]; then
wget http://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
else
wget http://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -O miniconda.sh;
fi;
- 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
- conda info -a
- SRC_DIR=$(pwd)


install:
# Create the py3 environnement ;
- conda create -q -n testenv python=$TRAVIS_PYTHON_VERSION numpy scipy pip
- source activate testenv
# Install dependencies :
- if [ "${TEST}" == "standard" ]; then
pip install codecov pytest pytest-cov pytest-sugar pytest-travis-fold openpyxl;
fi;
- if [ "${TEST}" == "flake" ]; then
pip install flake8 pep8-naming;
fi;
- cd ${SRC_DIR}
- pip install -e .


before_script:
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- sleep 3 # give xvfb some time to start


script:
- if [[ "${TEST}" == "standard" ]]; then
py.test --cov;
elif [[ "${TEST}" == "flake" ]]; then
flake8;
fi;

after_success:
- pip install codecov
- if [ "${TEST}" == "standard" ]; then
codecov;
fi

notifications:
email: raphaelvallat9@gmail.com
11 changes: 11 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
.. -*- mode: rst -*-
|
.. image:: https://img.shields.io/github/license/raphaelvallat/entropy.svg
:target: https://github.com/raphaelvallat/entropy/blob/master/LICENSE

.. image:: https://travis-ci.org/raphaelvallat/pingouin.svg?branch=master
:target: https://travis-ci.org/raphaelvallat/entropy

.. image:: https://ci.appveyor.com/api/projects/status/mukj36n939ftu4io?svg=true
:target: https://ci.appveyor.com/project/raphaelvallat/entropy

.. figure:: https://github.com/raphaelvallat/entropy/blob/master/docs/pictures/logo.png
:align: center

Expand Down
37 changes: 37 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
build: false

cache:
#- packages

platform:
-x64

environment:
matrix:
- PYTHON_VERSION: 3.6
MINICONDA: C:\Miniconda36-x64
PYTHON_ARCH: 64

init:
- "ECHO %PYTHON_VERSION% %MINICONDA% %PYTHON_ARCH%"

install:
- ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-desktop.ps1'))
# - ps: $screen_resolution = '1280x800'; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-desktop.ps1'))
# ------------------- PYTHON ENVIRONNEMENT -------------------
- "set PATH=%MINICONDA%;%MINICONDA%\\Scripts;%PATH%"
- "conda config --set always_yes yes --set changeps1 no"
- "conda update -q conda"
- "conda info -a"
- "conda create -q -n testenv python=%PYTHON_VERSION% numpy scipy matplotlib pip cython"
# Activate testing environnement :
- "activate testenv"
- "python -m pip install --upgrade pip"
# Install dependencies :
- "pip install pytest"
- "dir"
# ------------------- ENTROPY -------------------
- "python setup.py develop"

test_script:
- "pytest"
2 changes: 2 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
codecov:
token: 8051dd9b-dddd-43d8-b731-9b21e58a4d78

0 comments on commit 26fabc1

Please sign in to comment.