New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Discussion: Continuous Integration tools & features #130
Comments
|
Great initiative, let's do this. |
|
I never used Travis but I see it often, probably good enough. And Jenkins might be a bit overkill and a bit hard to maintain. Coverall is used to get unit test coverage of the code. I don't know if Travis can do it. Good work anyway! |
|
#124 related
|
|
As Travis support is not likely to be brought in #124, I suggest we keep this issue open to define:
|
|
Also, how to organize the code to allow unit testing. |
|
Though it's not that straightforward, it's actually the other way around :) Here's an efficient workflow, to bring tests to a software:
Having a good coverage before doing any refactoring makes the process way easier: any new issue or behavior alteration will be instantly spotted! Then, refactoring may happen as follows:
Tests specify what the software is expected to perform, and how it is used, thus their importance ;-) As an example, one of the major projects I've been working on for the last couple years:
What unit and functional tests have brought:
|
This also adds workload (I don't argue it's a best practice). We can't expect more contributors if the contribution process gets complicated. Your move from bash/perl/awk to standardized python scripts was probably the biggest improvement here. Adding tests is ok if you want to do things the right way™, but come on we're working on a 2500-line PHP script here... In my eyes it's really low priority compared to other code cleanup tasks. |
|
Well, let's do these 2500 lines of code the right way then :D Oh, and the nice things about testing:
|
|
I agree. A patch for a simple, initial test would be accepted. |
|
Closing this issue, as significant efforts are being made towards having a clean, robust and well-documented codebase - thanks to all contributors & issue reporters ;-) |
This issue focuses on adding Continuous Integration support for Shaarli (and is a bit Travis-oriented, too).
For a PHP website, it is relevant for checking:
Travis CI is free for Open Source projects; registration can be made through Github authentication. Once enabled, builds are triggered on any branch, i.e. from merges on master as from PRs.
Note that you can customize badges to reflect build status for given branches:
Note: Coveralls is a similar service that allows to check this and display a badge as well. IMHO, this is a bit of a gadget when everything can be run within a Travis job.
The build status reflects the exit code of the executed instructions; typically you'd want:
Given that Shaarli is a quite small-sized project, having a build job display the following information should suffice:
More advanced features could be achieved through the use of a dedicated CI service (Jenkins, Buildbot), such as:
The text was updated successfully, but these errors were encountered: