📜 ⬆️ ⬇️

PHPCI: Continuous Integration System for PHP Projects

image

More recently, the new continuous integration system for open-source PHP projects, PHPCI (current version 1.1.0), has been released from beta, it was mentioned briefly in PHP Digest 21 .

I have been experimenting with this system for some time, so I want to give you a small overview of it, especially since there is not a single article about Habré.
')
Now PHPCI is available in two options: rent by subscription, as well as self-hosted installation from source code.

Plugins


The system is written in PHP and for PHP, therefore out of the box it supports an impressive list of tools from the world of PHP through plugins:

It also has several general purpose plugins or those not directly related to PHP tools:

The project is quite modern and requires PHP version 5.3 or higher, uses PDO to connect to databases and in general, in my opinion, has simple and clear source code that uses namespaces for classes and PSR-2 style for code, which is undoubtedly very good .

Plug-ins, as a rule, are quite simple and small in terms of code size, so it’s easy to write your own plugin for a tool that is not supported in the standard package.

Project Configuration


The system has a declarative style for describing project configurations (using the YAML format), which is quite convenient, especially for small projects.

The configuration file phpci.yml is taken from the root of the project repository (or simply the working directory of the project, if we are talking about a local source), it is also possible to configure directly in the PHPCI project when it is created.

Below is a small example of the phpci.yml configuration file:

build_settings: ignore: - "vendor" - "tests" setup: composer: action: "install" test: php_unit: config: - "phpunit.xml" coverage: "logs/tests_coverage" args: "--stderr" php_mess_detector: allow_failures: true php_cpd: allow_failures: true php_loc: allow_failures: true php_parallel_lint: allow_failures: true 

The configuration file has several root sections:


Sources


The system supports as a source of projects: Github, Gitlab, Bitbucket, Git, Hg or a local directory. Svn is not supported yet (I'm not sure that its support is in the plans at all).

A spoon of tar


Despite its attractiveness, PHPCI is quite young and does not (yet) know how:

Summary


I personally see the project as very good and necessary, but still a little damp. Using this system for large projects may still be problematic, but on the other hand, PHPCI is great for small home projects right now.

How to install the system can be found on the page in the official project wiki .

Source: https://habr.com/ru/post/222305/


All Articles