mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-05-27 10:44:33 +00:00
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:
parent
a4b33e07c8
commit
41d6cae0a9
29
.travis.yml
Normal file
29
.travis.yml
Normal 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
|
||||||
0
plinth/tests/coverage/__init__.py
Normal file
0
plinth/tests/coverage/__init__.py
Normal file
@ -45,7 +45,7 @@ FILES_TO_OMIT = ['plinth/tests/*.py']
|
|||||||
COVERAGE_REPORT_DIR = 'plinth/tests/coverage/report'
|
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.
|
Subclass of setuptools Command to perform code test coverage analysis.
|
||||||
"""
|
"""
|
||||||
4
requirements.txt
Normal file
4
requirements.txt
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
cherrypy >= 3.0
|
||||||
|
coverage >= 3.7
|
||||||
|
django >= 1.7.0
|
||||||
|
pyyaml
|
||||||
7
setup.py
7
setup.py
@ -31,7 +31,7 @@ import shutil
|
|||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
from plinth import __version__
|
from plinth import __version__
|
||||||
from plinth.tests.coverage import test_coverage
|
from plinth.tests.coverage import coverage
|
||||||
|
|
||||||
|
|
||||||
DIRECTORIES_TO_CREATE = [
|
DIRECTORIES_TO_CREATE = [
|
||||||
@ -115,8 +115,7 @@ setuptools.setup(
|
|||||||
'cherrypy >= 3.0',
|
'cherrypy >= 3.0',
|
||||||
'django >= 1.7.0',
|
'django >= 1.7.0',
|
||||||
'django-bootstrap-form',
|
'django-bootstrap-form',
|
||||||
'pygobject',
|
'pyyaml',
|
||||||
'yaml'
|
|
||||||
],
|
],
|
||||||
tests_require=['coverage >= 3.7'],
|
tests_require=['coverage >= 3.7'],
|
||||||
include_package_data=True,
|
include_package_data=True,
|
||||||
@ -143,6 +142,6 @@ setuptools.setup(
|
|||||||
cmdclass={
|
cmdclass={
|
||||||
'clean': CustomClean,
|
'clean': CustomClean,
|
||||||
'install_data': CustomInstallData,
|
'install_data': CustomInstallData,
|
||||||
'test_coverage': test_coverage.TestCoverageCommand
|
'test_coverage': coverage.CoverageCommand
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user