From e2d68dac148055096ea45057bbd5fdd399c92ba5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrien=20Verg=C3=A9?= Date: Tue, 12 Jan 2016 21:16:39 +0100 Subject: [PATCH] Tests: Travis and Coveralls integration --- .travis.yml | 18 ++++++++++++++++++ Makefile | 3 --- README.md | 3 +++ setup.py | 6 +++--- 4 files changed, 24 insertions(+), 6 deletions(-) create mode 100644 .travis.yml delete mode 100644 Makefile diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..a5660b2 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,18 @@ +--- +language: python +python: + - 2.6 + - 2.7 + - 3.3 + - 3.4 + - 3.5 + - nightly +install: + - pip install pyyaml flake8 coveralls + - pip install . +script: + - flake8 . + - yamllint $(git ls-files '*.yml') + - coverage run --source=yamllint setup.py test +after_success: + coveralls diff --git a/Makefile b/Makefile deleted file mode 100644 index ace5197..0000000 --- a/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -.PHONY: tests -tests: - python -m unittest discover diff --git a/README.md b/README.md index f702eab..b2cf25e 100644 --- a/README.md +++ b/README.md @@ -1 +1,4 @@ # yamllint + +[![Build Status](https://travis-ci.org/adrienverge/yamllint.svg?branch=master)](https://travis-ci.org/adrienverge/yamllint) +[![Coverage Status](https://coveralls.io/repos/adrienverge/yamllint/badge.svg?branch=master&service=github)](https://coveralls.io/github/adrienverge/yamllint?branch=master) diff --git a/setup.py b/setup.py index 6945702..19d572d 100644 --- a/setup.py +++ b/setup.py @@ -44,7 +44,7 @@ setup( packages=find_packages(), scripts=['bin/yamllint'], package_data={'yamllint': ['conf/*.yml']}, - install_requires=[ - 'pyyaml>=3' - ], + install_requires=['pyyaml'], + tests_require=['nose'], + test_suite='nose.collector', )