/skeleton-ci-project

Skeleton PHP project with setup for CI

Primary LanguagePHPMIT LicenseMIT

Skeleton CI project

Basic project that shows how to setup a PHP project with the following tools:

A Phing script is provided to run the above in a single command.

Also composer scripts is provided to as an alternative way of running all the scripts.

Config is also available to run this in CircleCI.

Running locally

You need a PHP environment runnig PHP 7.2 or higher and composer.

First run get the dependencies. In the root directory run:

composer install

Then you have 2 options for running all the tools.

Composer scripts

composer ci

Phing

./vendor/bin/phing

Fixing coding style violations

PHP CS Fixer is used. When run as part of CI it is only reports violations. To fix them use one of:

composer cs-fix

or

./vendor/bin/phing cs-fix

CircleCI 2.0

This can run on CircleCI. See config file .circleci/config.yml.

Gitlab

This can run on Gitlab's CI. See config file .gitlab-ci.yml. Based from this example.