From cadf3136f0527857f96e3fb605e5f7f9663007f1 Mon Sep 17 00:00:00 2001 From: Balasankar C Date: Mon, 4 Sep 2017 12:51:58 +0530 Subject: [PATCH] Add CI related files --- .gitignore | 78 +++++++++++++++++++++++++++++++++++++++++++++-------- .testr.conf | 4 +++ .travis.yml | 12 ++++----- Makefile | 16 +++++------ circle.yml | 4 +++ tox.ini | 20 ++++++++++++++ 6 files changed, 107 insertions(+), 27 deletions(-) create mode 100644 .testr.conf create mode 100644 circle.yml create mode 100644 tox.ini diff --git a/.gitignore b/.gitignore index d500ec4..a12fe25 100755 --- a/.gitignore +++ b/.gitignore @@ -1,19 +1,75 @@ -*.py[co] +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class -# Packages -*.egg -*.egg-info -dist -build -eggs -parts -bin -develop-eggs +# C extensions +*.so + +# Distribution / packaging +.Python +env/ +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +*.egg-info/ .installed.cfg +*.egg + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec # Installer logs pip-log.txt +pip-delete-this-directory.txt # Unit test / coverage reports +htmlcov/ +.tox/ .coverage -.tox +.coverage.* +.cache +nosetests.xml +coverage.xml +*,cover +.hypothesis/ + +# Translations +*.mo +*.pot + +# Django stuff: +*.log + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + +#Ipython Notebook +.ipynb_checkpoints +*.swp + +# Specific +*.session +sandbox/ +/cover/ +/.testrepository/ + +*.bak +virtualenvs/ + +bin/ +web/ diff --git a/.testr.conf b/.testr.conf new file mode 100644 index 0000000..d52f837 --- /dev/null +++ b/.testr.conf @@ -0,0 +1,4 @@ +[DEFAULT] +test_command=${PYTHON:-python} -m subunit.run discover libindic $LISTOPT $IDOPTION +test_id_option=--load-list $IDFILE +test_list_option=--list diff --git a/.travis.yml b/.travis.yml index 5d21346..d033bd4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,12 +1,12 @@ language: python python: - "2.7" + - "3.4" + - "3.5" - "pypy" - - "3.3" install: - pip install -r requirements.txt - - pip install flake8 - - pip install coveralls + - pip install -r test-requirements.txt script: make travis after_success: coveralls notifications: @@ -15,6 +15,6 @@ notifications: irc: channels: - 'irc.freenode.net#silpa' - on_success: change - on_failure: change - use_notice: true \ No newline at end of file + on_success: #silpa + on_failure: #silpa + use_notice: true diff --git a/Makefile b/Makefile index 7453d11..5a4a9d2 100644 --- a/Makefile +++ b/Makefile @@ -1,13 +1,9 @@ travis: - nosetests -s --with-coverage --cover-package=soundex - flake8 soundex + python setup.py test --coverage \ + --coverage-package-name=soundex + flake8 --max-complexity 10 --ignore F401 libindic/soundex clean: - find . -name "*.pyc" -exec rm -vf {} \; - find -name __pycache__ -delete - -tox: - tox - -flake: - flake8 silpa tests + find . -iname "*.pyc" -exec rm -vf {} \; + find . -iname "__pycache__" -delete + sudo rm -rf build dist *egg* .tox .coverage .testrepository diff --git a/circle.yml b/circle.yml new file mode 100644 index 0000000..f20903f --- /dev/null +++ b/circle.yml @@ -0,0 +1,4 @@ +dependencies: + override: + - pip install tox tox-pyenv + - pyenv local 2.7.10 3.4.3 3.5.0 diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..0e0dce6 --- /dev/null +++ b/tox.ini @@ -0,0 +1,20 @@ +# Tox (http://tox.testrun.org/) is a tool for running tests +# in multiple virtualenvs. This configuration file will run the +# test suite on all supported python versions. To use it, "pip install tox" +# and then run "tox" from this directory. + +[tox] +envlist = py35, py27, pep8 + +[testenv] +commands = {envpython} setup.py test +deps = + -rrequirements.txt + -rtest-requirements.txt + +[testenv:pep8] +deps= + -rrequirements.txt + -rtest-requirements.txt +commands= + flake8 libindic