Skip to content

Commit

Permalink
add CIs
Browse files Browse the repository at this point in the history
  • Loading branch information
Hicham Janati committed May 31, 2019
1 parent 0afe69d commit 56725fe
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Configuration for coverage.py

[run]
branch = True
source = pyldpc
include = */pyldpc/*
omit = */setup.py
*/pyldpc/examples_utils/*

[report]
exclude_lines =
pragma: no cover
def __repr__
if self.debug:
if settings.DEBUG
raise AssertionError
raise NotImplementedError
if 0:
if __name__ == .__main__.:
45 changes: 45 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
dist: trusty
sudo: false

language: python

cache:
directories:
- $HOME/.cache/pip

matrix:
include:
- env: PYTHON_VERSION="3.5" NUMPY_VERSION="1.13.1" SCIPY_VERSION="0.19.1"
SKLEARN_VERSION="0.19.1"
- env: PYTHON_VERSION="3.6" NUMPY_VERSION="1.13.1" SCIPY_VERSION="0.19.1"
SKLEARN_VERSION="0.19.1"
- env: PYTHON_VERSION="3.7" NUMPY_VERSION="*" SCIPY_VERSION="*"
SKLEARN_VERSION="*"

before_install:
# install miniconda
- deactivate
- wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
- MINICONDA_PATH=/home/travis/miniconda
- chmod +x miniconda.sh && ./miniconda.sh -b -p $MINICONDA_PATH
- export PATH=$MINICONDA_PATH/bin:$PATH
- conda update --yes --quiet conda

# create the testing environment
- conda env create --file environment.yml python=${PYTHON_VERSION}
- source activate pyldpc-env
- conda install --yes --quiet pytest pytest-cov coverage
- pip install flake8 check-manifest
- pip install codecov

install:
- python setup.py build_ext --inplace
- pip install -e .

script:
- pytest -lv --cov-report term-missing pyldpc --cov=pyldpc --cov-config .coveragerc
- make
- flake8 --count pyldpc
after_success:
- cp .coverage $TRAVIS_BUILD_DIR
- codecov --root $TRAVIS_BUILD_DIR || echo "codecov upload failed"
6 changes: 6 additions & 0 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
name: pyldpc-env


dependencies:
- numpy
- scipy

0 comments on commit 56725fe

Please sign in to comment.