Improved README and docs

This commit is contained in:
Dmitry Khomutov 2017-01-04 20:36:54 +07:00
parent 4692999337
commit 435a169589
10 changed files with 90 additions and 34 deletions

View file

@ -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).

View file

@ -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
------------------------------

14
docs/en/screenshots.md Normal file
View file

@ -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)

BIN
docs/screenshots/build-errors.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 268 KiB

After

Width:  |  Height:  |  Size: 448 KiB

BIN
docs/screenshots/build-information.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 94 KiB

After

Width:  |  Height:  |  Size: 120 KiB

BIN
docs/screenshots/build-log.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 76 KiB

After

Width:  |  Height:  |  Size: 124 KiB

BIN
docs/screenshots/dashboard.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 144 KiB

After

Width:  |  Height:  |  Size: 190 KiB

BIN
docs/screenshots/login.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

BIN
docs/screenshots/project.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 132 KiB

After

Width:  |  Height:  |  Size: 160 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 894 B