No description
  • PHP 87%
  • HTML 7.4%
  • JavaScript 4.4%
  • CSS 1.2%
Find a file
SimonHeimberg ffce3e31e7 plugins depending on tests success state run also on exception
Failure notification on an exception seems important.
Now failures in this plugins will not count for build state.
2017-08-22 16:22:56 +02:00
app Added ./app directory to Git. 2017-05-29 19:37:25 +07:00
bin Code style fixes 2017-03-12 11:40:40 +07:00
docs Bitbucket build status API, create comments on commits and Pull Requests 2017-08-20 14:19:07 +06:00
public Fixed markup for public status + PHP Censor logo fixes. 2017-08-20 12:58:15 +07:00
runtime Added directory /runtime/status_cache. Issue #19 2017-02-13 08:36:36 +07:00
src plugins depending on tests success state run also on exception 2017-08-22 16:22:56 +02:00
tests test cases inherit from PhpUnit testcase with namespeces 2017-07-24 08:59:49 +02:00
.gitignore Fixed logging (Now logging autostarting without special loggerconfig.php). Issue #59. 2017-05-23 23:17:39 +07:00
.php-censor.yml Fixed PHP Censor config. 2017-06-20 20:01:06 +07:00
.travis.yml Fixed Travis CI config. 2017-06-20 20:59:41 +07:00
bootstrap.php Code style fixes 2017-03-12 11:40:40 +07:00
CHANGELOG.md Small code style fix. 2017-07-16 10:56:55 +07:00
composer.json Updated dependencies (Fixes). 2017-08-17 19:38:03 +07:00
composer.lock Updated dependencies (Fixes). 2017-08-17 19:38:03 +07:00
LICENSE.md Small updates 2017-01-06 11:15:08 +07:00
phpunit.mysql.xml Improved TravisCI build settings 2017-02-18 14:34:23 +07:00
phpunit.pgsql.xml Improved TravisCI build settings 2017-02-18 14:34:23 +07:00
README.md Fixed markup for public status + PHP Censor logo fixes. 2017-08-20 12:58:15 +07:00

PHP Censor Travis CI Latest Version Total downloads License SensioLabs Insight

PHP Censor

PHP Censor is a open source self-hosted continuous integration server for PHP projects (PHPCI fork).

Dashboard

More screenshots.

System requirements

  • Unix-like OS (Windows isn't supported);

  • PHP 5.6+ (with OpenSSL support and enabled functions: exec(), shell_exec() and proc_open());

  • Web-server (Nginx or Apache2);

  • Database (MySQL/MariaDB or PostgreSQL);

  • Beanstalkd queue (Optional);

Features

  • Clone project from Github, Bitbucket, Gitlab, Git, Mercurial, SVN or from local directory;

  • Set up and tear down database tests for PostgreSQL, MySQL or SQLite;

  • Install Composer dependencies;

  • Run tests for PHPUnit, Atoum, Behat, Codeception and PHPSpec;

  • Check code via Lint, PHPParallelLint, Pdepend, PHPCodeSniffer, PHPCpd, PHPCsFixer, PHPDocblockChecker, PHPLoc, PHPMessDetect, PHPTalLint and TechnicalDept;

  • Run through any combination of the other supported plugins, including Campfire, CleanBuild, CopyBuild, Deployer, Env, Git, Grunt, Gulp, PackageBuild, Phar, Phing, Shell and Wipe;

  • Send notifications on Email, XMPP, Slack, IRC, Flowdock, HipChat and Telegram;

  • Use your LDAP-server for authentication;

Installing

  • Go to the directory in which you want to install PHP Censor, for example: /var/www:
cd /var/www
  • Create project by Composer:
composer create-project corpsee/php-censor php-censor.local --keep-vcs

Or download latest archive from Github, unzip it and run composer install.

  • Create empty database for application (Mysql/MariaDB or Postgres);

  • Install Beanstalkd Queue (Optional, if you are going to use queue with Worker):

aptitude install beanstalkd # For deb-based
  • Install PHP Censor itself:
cd ./php-censor.local

# Interactive installation
./bin/console php-censor:install

# Non-interactive installation
./bin/console php-censor:install --url='http://php-censor.local' --db-type=pgsql --db-host=localhost --db-name=php-censor --db-user=php-censor --db-password=php-censor --db-port=null --admin-name=admin --admin-password=admin --admin-email='admin@php-censor.local' --queue-use=1 --queue-host=localhost --queue-name=php-censor

# Non-interactive installation with prepared config.yml file
./bin/console php-censor:install --config-from-file=yes --admin-name=admin --admin-password=admin --admin-email='admin@php-censor.local'

Installing via Docker

If you want to install PHP Censor as Docker container, you can use ket4yii/docker-php-censor project.

Updating

  • Go to your PHP Censor directory (to /var/www/php-censor.local for example):
cd /var/www/php-censor.local
  • Pull the latest code by Git:
git pull -r
  • Update the Composer dependencies: composer install

  • Update the PHP Censor database scheme:

./bin/console php-censor-migrations:migrate

Configuring project

There are several ways to set up the project:

  • Add project without any project config (Runs "zero-config" plugins, including: Composer, TechnicalDept, PHPLoc, PHPCpd, PHPCodeSniffer, PHPMessDetect, PHPDocblockChecker, PHPParallelLint, PHPUnit and Codeception);

  • 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;

  • Add project config in PHP Censor project page (And it will cancel file config from project repository);

The project config should look something like this:

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.

Migrations

Run to apply latest migrations:

cd /path/to/php-censor
./bin/console php-censor-migrations:migrate

Run to create new migration:

cd /path/to/php-censor
./bin/console php-censor-migrations:create NewMigrationName

Tests

cd /path/to/php-censor

# For testing on MySQL DB
./vendor/bin/phpunit --configuration ./phpunit.mysql.xml

# For testing on PostgreSQL
./vendor/bin/phpunit --configuration ./phpunit.pgsql.xml

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' database on 'localhost' with user/password: root/<empty>' for MySQL and with user/password: postgres/<empty>' for PostgreSQL (You can change default test user, password and database name in phpunit.mysql|pgsql.xml config). If connection failed tests will be skipped.

Documentation

Full PHP Censor documentation.

License

PHP Censor is open source software licensed under the BSD-2-Clause license.