From e5fc983e7d397df258d256995ca50982f52ac481 Mon Sep 17 00:00:00 2001 From: Matthew Aynalem Date: Sun, 16 Jul 2017 14:53:26 -0700 Subject: [PATCH] add travis ci and coveralls support. fixes #2 --- .travis.yml | 17 +++++++++++++++++ README.md | 8 +++++++- requirements-test.txt | 2 ++ requirements.txt | 0 setup.cfg | 13 +++++++++++++ src/packerlicious/__init__.py | 0 tests/__init__.py | 0 .../test_project_infrastructure.py | 2 ++ 8 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 .travis.yml create mode 100644 requirements-test.txt create mode 100644 requirements.txt create mode 100644 setup.cfg create mode 100644 src/packerlicious/__init__.py create mode 100644 tests/__init__.py create mode 100644 tests/packerlicious/test_project_infrastructure.py diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..31373c5 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,17 @@ +language: python +python: + - 2.6 + - 2.7 + - 3.3 + - 3.4 + - 3.5 + - 3.6 + - pypy +install: + - pip install -r requirements.txt + - pip install -r requirements-test.txt + - pip install coveralls +script: + - coverage run -m py.test +after_success: + - coveralls diff --git a/README.md b/README.md index 896b51b..f47e84a 100644 --- a/README.md +++ b/README.md @@ -1 +1,7 @@ -# packerlicious \ No newline at end of file +# packerlicious +[![Build Status][build-status-badge]][build-status] [![Test coverage][test-coverage-badge]][test-coverage] + +[build-status-badge]: https://travis-ci.org/mayn/packerlicious.svg?branch=master +[build-status]: https://travis-ci.org/mayn/packerlicious +[test-coverage-badge]: https://coveralls.io/repos/github/mayn/packerlicious/badge.svg?branch=master +[test-coverage]: https://coveralls.io/github/mayn/packerlicious diff --git a/requirements-test.txt b/requirements-test.txt new file mode 100644 index 0000000..49ec960 --- /dev/null +++ b/requirements-test.txt @@ -0,0 +1,2 @@ +pytest +coverage diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..e69de29 diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..8b7a166 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,13 @@ +[coverage:run] +branch = true +source = src + +[coverage:report] +omit = + *test* + *tox* + +[tool:pytest] +addopts = --verbose +testpaths = + tests diff --git a/src/packerlicious/__init__.py b/src/packerlicious/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/__init__.py b/tests/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/packerlicious/test_project_infrastructure.py b/tests/packerlicious/test_project_infrastructure.py new file mode 100644 index 0000000..58ef42b --- /dev/null +++ b/tests/packerlicious/test_project_infrastructure.py @@ -0,0 +1,2 @@ +def test_travis_with_coveralls(): + assert True