Mailinglist Archive: yast-devel (62 mails)

< Previous Next >
[yast-devel] Yast and GitHub friends: Travis, Coveralls, CodeClimate, RubyDoc

Hi all,

you probably know the services listed in $subj, if not here is a short summary:

- Travis - is a CI service similar to Jenkins (see [1] output), but it's
integrated with GitHub, e.g. it displays the test status (passed/failed) at
GitHub commits or pull requests. The advantage is that you can see the build
status even *before* creating or merging the pull request.

I'm already using it at rubygem-scc_api, see example [2] (There are green
checkmarks in front of commit numbers, for open pull requests it colorizes the
"merge" box in green/red depending on the build status.)

- Coveralls - monitors code coverage, it's an extension for simplecov code
tool. It maintains the code coverage history so you can easily see how it is
improved (or not ;-)), see example [3]

It also comments on pull requests, see [4]. Unfortunately I have seen it
commenting just few times, I do not know if you need a payed account for
full support or it's a bug... Anyway, it's a nice add-on feature.

- CodeClimate - Provides code metrics, it can find duplicated code, too complex
(long) methods...etc. Do not be surprised that it reports a bad code for Yast
modules, esp. after automatic YCP to Ruby conversion the code does not look

Again, it provides history so you can see how you code quality gets better
(or not), you can easily find the commits which added bad quality code.

See example [5]

The services above also provide badges (PNG icons) which you can
place into the main page so you can quickly see the current
overall status, see [6]. Click an icon to the details.

- RubyDoc - The last service I'd like to mention is which builds
documentation and supports GitHub repositories. The advantage is that the
documentation is built automatically and you do not need any extra server to
host it.

See example [7].

Using in Yast

The main issue when using Travis in Yast is that it can install the additional Ruby libraries only via gems (using bundler). And because Yast is not available as a gem we have a trouble.

My workaround it to basically stub all Yast functionality, see yast-registration
pull request [8].

That means this approach is good for new code which does not depend on Ruby YCP
support much (the legacy builtins etc...) and does not use much Yast specific features. And even with new code some parts cannot be tested or it is really difficult to test them (e.g. Yast clients).

This also does not allow to run the old tests which depend on the y2logging

All in all I think this is acceptable solution, the advantages mentioned above overweight the extra mocking needed. I'm already using the services in
rubygem-scc_api and I really like them.

Please, check the pull request [9] and post here what you think about this
You can check [10] to see how it should look like after merging it.

Possible solution

Travis actually supports installing any additional packages, but unfortunately
us, it builds on Ubuntu (32-bit Ubuntu 12.04) system.

If we would port Yast (at least the base packages) to Ubuntu we could easily move to Travis without any workarounds... (yeah, that sounds like a hackweek or workshop project, doesn't it? :-)) See details in [10]

Any comments?



Ladislav Slez√°k
Appliance department / YaST Developer
Lihovarsk√° 1060/12
190 00 Prague 9 / Czech Republic
tel: +420 284 028 960
To unsubscribe, e-mail: yast-devel+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: yast-devel+owner@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages