diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000000000..2d1485c47 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,29 @@ +# Travis-CI configuration file for Plinth + +language: python +python: + - "3.2" + +# Debian packages required +addons: + apt_packages: + - python3-gi + +virtualenv: + system_site_packages: true + +# Command to install dependencies +install: "pip install -r requirements.txt" + +# Command to run tests +script: python3 setup.py test + +notifications: + email: + on_success: change + on_failure: always + irc: + channels: + - "irc.oftc.net#freedombox" + on_success: always + on_failure: always diff --git a/plinth/tests/coverage/__init__.py b/plinth/tests/coverage/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/plinth/tests/coverage/test_coverage.py b/plinth/tests/coverage/coverage.py similarity index 98% rename from plinth/tests/coverage/test_coverage.py rename to plinth/tests/coverage/coverage.py index b16e10c17..b41d367c2 100644 --- a/plinth/tests/coverage/test_coverage.py +++ b/plinth/tests/coverage/coverage.py @@ -45,7 +45,7 @@ FILES_TO_OMIT = ['plinth/tests/*.py'] COVERAGE_REPORT_DIR = 'plinth/tests/coverage/report' -class TestCoverageCommand(setuptools.Command): +class CoverageCommand(setuptools.Command): """ Subclass of setuptools Command to perform code test coverage analysis. """ diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 000000000..dfa098772 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,4 @@ +cherrypy >= 3.0 +coverage >= 3.7 +django >= 1.7.0 +pyyaml diff --git a/setup.py b/setup.py index 2e39bde5e..34992089c 100755 --- a/setup.py +++ b/setup.py @@ -31,7 +31,7 @@ import shutil import subprocess from plinth import __version__ -from plinth.tests.coverage import test_coverage +from plinth.tests.coverage import coverage DIRECTORIES_TO_CREATE = [ @@ -115,8 +115,7 @@ setuptools.setup( 'cherrypy >= 3.0', 'django >= 1.7.0', 'django-bootstrap-form', - 'pygobject', - 'yaml' + 'pyyaml', ], tests_require=['coverage >= 3.7'], include_package_data=True, @@ -143,6 +142,6 @@ setuptools.setup( cmdclass={ 'clean': CustomClean, 'install_data': CustomInstallData, - 'test_coverage': test_coverage.TestCoverageCommand + 'test_coverage': coverage.CoverageCommand }, )