diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 00000000..ee37c324 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,10 @@ +language: python +python: + - "3.2" + - "3.3" + - "3.4" +install: + - pip install -r requirements.txt + - python download_corpora.py +script: + - python tests/unit_tests.py diff --git a/README.rst b/README.rst index 87309793..7e1ed6d7 100644 --- a/README.rst +++ b/README.rst @@ -5,6 +5,11 @@ Newspaper3k: Article scraping & curation :target: http://badge.fury.io/py/newspaper3k.svg :alt: Latest version +.. image:: https://travis-ci.org/codelucas/newspaper.svg + :target: http://travis-ci.org/codelucas/newspaper/ + :alt: Build status + + Inspired by `requests`_ for its simplicity and powered by `lxml`_ for its speed: "Newspaper is an amazing python library for extracting & curating articles." diff --git a/tests/unit_tests.py b/tests/unit_tests.py index 61c1e923..c26794e9 100644 --- a/tests/unit_tests.py +++ b/tests/unit_tests.py @@ -519,7 +519,9 @@ def test_spanish_fulltext_extract(self): suite.addTest(UrlTestCase()) suite.addTest(ArticleTestCase()) suite.addTest(APITestCase()) - unittest.TextTestRunner().run(suite) + result = unittest.TextTestRunner().run(suite) + exit_code = 0 if result.wasSuccessful() else 1 + sys.exit(exit_code) # TODO: suite.addTest(SourceTestCase()) # suite.addTest(MThreadingTestCase())