PHPCI (PHP Continuous Integration), is an open-source continuous integration tool. It works by automatically building your project and running unit tests every time you commit code changes to the repository. In this tutorial, we will walk you through the steps of installing PHPCI on Clear Linux Latest.
PHPCI relies on several dependencies to function effectively. Therefore, the first step would be to install these dependencies. Run the following command to install the dependencies.
sudo swupd bundle-add php-basic devpkg-openssl devpkg-libxml2 devpkg-zip
The above command installs the php-basic
, devpkg-openssl
, devpkg-libxml2
, and devpkg-zip
packages.
Composer is a dependency manager for PHP. You can use Composer to install PHPCI and its dependencies. Clear Linux Latest already includes Composer; therefore, you don’t need to install it. However, you need to make sure that the PHP binary directory is in the PATH environment variable.
Use the following command to check if PHP binary directory (/usr/bin
) is in the PATH environment variable:
echo $PATH | grep "/usr/bin"
If the above command doesn’t output anything, add this line to your .bashrc or .bash_profile file.
export PATH=$PATH:/usr/bin
To load the new configuration, run the following command:
source ~/.bashrc
In this step, we will clone the PHPCI repository. Run the following command:
git clone https://github.com/Block8/PHPCI.git
Navigate to the PHPCI directory that you had cloned in the previous step. Use the following command to run the composer install command.
composer install
PHPCI reads its configuration from the phphci.yml
file. Make a copy of the file phphci.yml.dist
and name it phphci.yml
. Change the following parameters in the phphci.yml
file:
cp phphci.yml.dist phphci.yml
vi phphci.yml
After configuring the phphci.yml
file, you can start PHPCI by running the following command:
php console phpci:run-builds
You should see a message indicating that PHPCI is running.
In this tutorial, we have described the steps involved in installing PHPCI on Clear Linux Latest. You can use PHPCI to automate your build and test process, increasing productivity, and reducing errors.
If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!
Alternatively, for the best virtual desktop, try Shells!