Enable integration of Plinth with Travis-CI

- Add files .travis.yml and requirements.txt
- In setup.py, remove 'pygobject' from install_requires
- In setup.py, add 'pyyaml' to install_requires
- Add file plinth/tests/coverage/__init__.py
- Rename file plinth/tests/coverage/test_coverage.py to coverage.py
- In plinth/tests/coverage/coverage.py, rename class TestCoverageCommand
  to CoverageCommand
This commit is contained in:
Bob Girard 2015-04-01 16:12:59 -07:00
parent a4b33e07c8
commit 41d6cae0a9
5 changed files with 37 additions and 5 deletions

29
.travis.yml Normal file
View File

@ -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

View File

View File

@ -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.
"""

4
requirements.txt Normal file
View File

@ -0,0 +1,4 @@
cherrypy >= 3.0
coverage >= 3.7
django >= 1.7.0
pyyaml

View File

@ -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
},
)