From 4b1595ce97aa63f032bd4c0a5faf1a22370eb80b Mon Sep 17 00:00:00 2001 From: Thomas Adamcik Date: Tue, 4 Sep 2012 23:30:59 +0200 Subject: [PATCH 1/4] Attempt at running on travis-ci. - Installs our apt-repo to worker. - Installs all mopidy deps listed in apt. - Runs our tests with site-packages, thus we can only test the main python verision travis uses. --- .travis.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 00000000..a57f7474 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,12 @@ +language: python + +install: + - "wget -q -O - http://apt.mopidy.com/mopidy.gpg | sudo apt-key add -" + - "sudo wget -q -O /etc/apt/sources.list.d/mopidy.list http://apt.mopidy.com/mopidy.list" + - "sudo apt-get update" + - "sudo apt-get install $(apt-cache depends mopidy | awk '$2 !~ /mopidy/ {print $2}')" + +before_script: + - "rm $VIRTUAL_ENV/lib/python$TRAVIS_PYTHON_VERSION/no-global-site-packages.txt" + +script: nosetests From 1255b87877b685e23c900694b947cdc2011bb8c1 Mon Sep 17 00:00:00 2001 From: Thomas Adamcik Date: Wed, 5 Sep 2012 01:26:05 +0200 Subject: [PATCH 2/4] Try running with fakesink for gstreamer test. --- tests/gstreamer_test.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/gstreamer_test.py b/tests/gstreamer_test.py index b370981a..2f62424f 100644 --- a/tests/gstreamer_test.py +++ b/tests/gstreamer_test.py @@ -12,9 +12,13 @@ from tests import unittest, path_to_data_dir class GStreamerTest(unittest.TestCase): def setUp(self): settings.BACKENDS = ('mopidy.backends.local.LocalBackend',) + settings.OUTPUT = 'fakesink' self.song_uri = path_to_uri(path_to_data_dir('song1.wav')) self.gstreamer = GStreamer() + def tearDown(self): + settings.runtime.clear() + def prepare_uri(self, uri): self.gstreamer.prepare_change() self.gstreamer.set_uri(uri) From 8b4302e388cc0b744f2bb540d0ff417a372c4818 Mon Sep 17 00:00:00 2001 From: Stein Magnus Jodal Date: Wed, 5 Sep 2012 23:58:30 +0200 Subject: [PATCH 3/4] Add Travis CI description to development docs --- docs/development/contributing.rst | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/docs/development/contributing.rst b/docs/development/contributing.rst index 782d2f20..373da1a0 100644 --- a/docs/development/contributing.rst +++ b/docs/development/contributing.rst @@ -104,17 +104,26 @@ For more documentation on testing, check out the `nose documentation `_. -Continuous integration server -============================= +Continuous integration +====================== -We run a continuous integration (CI) server at http://ci.mopidy.com/ that runs -all test on multiple platforms (Ubuntu, OS X, etc.) for every commit we push to -GitHub. +Mopidy uses the free service `Travis CI `_ +for automatically running the test suite when code is pushed to GitHub. This +works both for the main Mopidy repo, but also for any forks. This way, any +contributions to Mopidy through GitHub will automatically be tested by Travis +CI, and the build status will be visible in the GitHub pull request interface, +making it easier to evaluate the quality of pull requests. -In addition to running tests, the CI server also gathers coverage statistics -and uses pylint to check for errors and possible improvements in our code. So, -if you're out of work, the code coverage and pylint data at the CI server -should give you a place to start. +In addition, we run a Jenkins CI server at http://ci.mopidy.com/ that runs all +test on multiple platforms (Ubuntu, OS X, x86, arm) for every commit we push to +the ``develop`` branch in the main Mopidy repo on GitHub. Thus, new code isn't +tested by Jenkins before it is merged into the ``develop`` branch, which is a +bit late, but good enough to get broad testing before new code is released. + +In addition to running tests, the Jenkins CI server also gathers coverage +statistics and uses pylint to check for errors and possible improvements in our +code. So, if you're out of work, the code coverage and pylint data at the CI +server should give you a place to start. Writing documentation From d8f895fd38a5ccbe375bf749b8aa20d99e033409 Mon Sep 17 00:00:00 2001 From: Stein Magnus Jodal Date: Wed, 5 Sep 2012 23:58:52 +0200 Subject: [PATCH 4/4] Add Travis CI build status badge to README --- README.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.rst b/README.rst index 13ab0f92..0b0f6965 100644 --- a/README.rst +++ b/README.rst @@ -2,6 +2,8 @@ Mopidy ****** +.. image:: https://secure.travis-ci.org/mopidy/mopidy.png?branch=develop + Mopidy is a music server which can play music from `Spotify `_ or from your local hard drive. To search for music in Spotify's vast archive, manage playlists, and play music, you can use most