diff --git a/README.md b/README.md index e9581311..c08d65a7 100644 --- a/README.md +++ b/README.md @@ -1,38 +1,90 @@ PHP Censor ========== -PHP Censor is a fork of PHPCI (And B8Framework) and is a free and open source (BSD-2-Clause license) continuous -integration tool specifically designed for PHP. We've built it with simplicity in mind, so whilst it doesn't -do *everything* Jenkins can do, it is a breeze to set up and use. +**PHP Censor** is a fork of [PHPCI](https://www.phptesting.org) +(And [B8Framework](https://github.com/Block8/b8framework)) and is a open source +([BSD-2-Clause license](LICENSE.md)) continuous integration tool specifically designed for PHP. What it does ------------ -* Clones your project from Github, Bitbucket or a local path -* Allows you to set up and tear down test databases. -* Installs your project's Composer dependencies. -* Runs through any combination of the [supported plugins](docs/README.md)). -* You can mark directories for the plugins to ignore. -* You can mark certain plugins as being allowed to fail (but still run.) +* Clones your project from Github, Bitbucket, Gitlab or Git; -What it doesn't do (yet) ------------------------- +* Allows you to set up and tear down test databases; -* Virtualised testing. -* Multiple PHP-version tests. +* Installs your project's Composer dependencies; -Screenshots ------------ +* Runs through any combination of the [supported plugins](docs/en/README.md)); [![Dashboard](docs/screenshots/dashboard.png)](docs/screenshots/dashboard.png) -[![Project](docs/screenshots/project.png)](docs/screenshots/project.png) +More [screenshots](docs/en/screenshots.md). -[![Build log](docs/screenshots/build-log.png)](docs/screenshots/build-log.png) +Configuring +----------- -[![Build errors](docs/screenshots/build-errors.png)](docs/screenshots/build-errors.png) +Similar to Travis CI, to support **PHP Censor** in your project, you simply need to add a `.php-censor.yml` +(`phpci.yml`/`.phpci.yml` for backward compatibility with PHPCI) file to the root of your repository. The file should +look something like this: -[![Build information](docs/screenshots/build-information.png)](docs/screenshots/build-information.png) +```yml +setup: + composer: + action: "install" +test: + php_unit: + config: "phpunit.xml" + php_mess_detector: + allow_failures: true + php_code_sniffer: + standard: "PSR2" + php_cpd: + allow_failures: true +complete: + email: + default_mailto_address: admin@php-censor.local +``` + +More details about [configuring project](docs/en/config.md). + +Installing +---------- + +You will need PHP 5.6+ (with OpenSSL support and enabled functions: `exec()`, `shell_exec()` and `proc_open()`) +with web-server (Nginx or Apache2), MySQL (or MariaDB) database and Composer. + +* Go to the directory in which you want to install PHP Censor, for example: `/var/www`; + +* Download PHP Censor from this repository and unzip it (to `/var/www/php-censor.local` for example); + +* Go to the PHP Censor directory: `cd /var/www/php-censor.local`; + +* Install dependencies using Composer: `composer install`; + +* Create empty MySQL database for application; + +* Install Beanstalkd queue (`aptitude install beanstalkd`); + +* Install PHP Censor itself: `./bin/console php-censor:install`; + +* [Add a virtual host to your web server](docs/en/virtual_host.md), pointing to the `public` directory within your new +PHP Censor directory. You'll need to set up rewrite rules to point all non-existent requests to PHP Censor; + +* [Set up the PHP Censor Worker](docs/en/workers/worker.md), or you can run builds using the +[daemon](docs/en/workers/daemon.md) or [a cron-job](docs/en/workers/cron.md) to run PHP Censor builds; + +More details about [installation](docs/en/installing.md). + +Updating +-------- + +* Go to your PHP Censor directory (to `/var/www/php-censor.local` for example); + +* Pull the latest code. This would look like this: `git pull`; + +* Update the PHP Censor database: `./bin/console php-censor-migrations:migrate`; + +* Update the Composer dependencies: `composer update` Tests ----- @@ -44,7 +96,8 @@ cd /path/to/php-censor For Phar plugin tests set 'phar.readonly' setting to Off (0) in `php.ini` config. Otherwise tests will be skipped. -For database B8Framework tests create empty 'b8_test' MySQL database on 'localhost' with user/password: `root/root`. Otherwise database tests will be skipped. +For database B8Framework tests create empty 'b8_test' MySQL database on 'localhost' with user/password: `root/root`. +Otherwise database tests will be skipped. Migrations ---------- @@ -66,9 +119,9 @@ cd /path/to/php-censor Documentation ------------- -[PHP Censor documentation](docs/README.md) +[Full PHP Censor documentation](docs/en/README.md). License ------- -PHP Censor is open source software licensed under the BSD-2-Clause license. +*PHP Censor* is open source software licensed under the [BSD-2-Clause license](LICENSE.md). diff --git a/docs/en/installing.md b/docs/en/installing.md index a3ac3c59..0efa0cdd 100644 --- a/docs/en/installing.md +++ b/docs/en/installing.md @@ -4,7 +4,7 @@ Installing PHP Censor What you'll need ---------------- -* PHP 5.4.0 or above +* PHP 5.6.0+ * A web server (Nginx or Apache) * [Composer](https://getcomposer.org/download/) * [Git](http://git-scm.com/downloads) @@ -12,17 +12,6 @@ What you'll need * The following functions need to be enabled: `exec()`, `shell_exec()` and `proc_open()` in php.ini. * PHP must have OpenSSL support enabled. -Installing PHP Censor from Composer ------------------------------------ - -* Go to the directory in which you want to install PHP Censor, for example: `/var/www` -* Download Composer if you haven't already: `curl -sS https://getcomposer.org/installer | php` -* Download PHP Censor: `./composer.phar create-project corpsee/php-censor php-censor --keep-vcs --no-dev` -* Go to the newly created PHP Censor directory, and install Composer dependencies: `cd php-censor && ../composer.phar install` -* Run the PHP Censor installer: `./bin/console php-censor:install` -* [Add a virtual host to your web server](virtual_host.md), pointing to the `public` directory within your new PHP Censor directory. You'll need to set up rewrite rules to point all non-existent requests to PHP Censor. -* [Set up the PHP Censor Worker](workers/worker.md), or you can run builds using the [daemon](workers/daemon.md) or [a cron-job](workers/cron.md) to run PHP Censor builds. - Installing PHP Censor Manually ------------------------------ diff --git a/docs/en/screenshots.md b/docs/en/screenshots.md new file mode 100644 index 00000000..398ef060 --- /dev/null +++ b/docs/en/screenshots.md @@ -0,0 +1,14 @@ +Screenshots +=========== + +[![Login](../screenshots/login.png)](../screenshots/login.png) + +[![Dashboard](../screenshots/dashboard.png)](../screenshots/dashboard.png) + +[![Project](../screenshots/project.png)](../screenshots/project.png) + +[![Build log](../screenshots/build-log.png)](../screenshots/build-log.png) + +[![Build errors](../screenshots/build-errors.png)](../screenshots/build-errors.png) + +[![Build information](../screenshots/build-information.png)](../screenshots/build-information.png) diff --git a/docs/screenshots/build-errors.png b/docs/screenshots/build-errors.png old mode 100755 new mode 100644 index a054f207..2acc5c0e Binary files a/docs/screenshots/build-errors.png and b/docs/screenshots/build-errors.png differ diff --git a/docs/screenshots/build-information.png b/docs/screenshots/build-information.png old mode 100755 new mode 100644 index f28063c5..6cd2e5f7 Binary files a/docs/screenshots/build-information.png and b/docs/screenshots/build-information.png differ diff --git a/docs/screenshots/build-log.png b/docs/screenshots/build-log.png old mode 100755 new mode 100644 index 3a44d7d7..c7ac64a0 Binary files a/docs/screenshots/build-log.png and b/docs/screenshots/build-log.png differ diff --git a/docs/screenshots/dashboard.png b/docs/screenshots/dashboard.png old mode 100755 new mode 100644 index 49d5ba1c..80da5865 Binary files a/docs/screenshots/dashboard.png and b/docs/screenshots/dashboard.png differ diff --git a/docs/screenshots/login.png b/docs/screenshots/login.png new file mode 100644 index 00000000..7c4ea076 Binary files /dev/null and b/docs/screenshots/login.png differ diff --git a/docs/screenshots/project.png b/docs/screenshots/project.png old mode 100755 new mode 100644 index 8e78b687..01fbaa75 Binary files a/docs/screenshots/project.png and b/docs/screenshots/project.png differ diff --git a/public/favicon.ico b/public/favicon.ico index e795ebcc..810051a3 100644 Binary files a/public/favicon.ico and b/public/favicon.ico differ