├── .gitignore ├── .scrutinizer.yml ├── .travis.yml ├── CHANGELOG.md ├── LICENSE.txt ├── README.md ├── composer.json ├── phpunit.xml.dist └── test └── Bootstrap.php /.gitignore: -------------------------------------------------------------------------------- 1 | .settings 2 | .buildpath 3 | .project 4 | vendor 5 | composer.lock 6 | _build 7 | .idea 8 | -------------------------------------------------------------------------------- /.scrutinizer.yml: -------------------------------------------------------------------------------- 1 | before_commands: 2 | - "composer install --dev --prefer-source" 3 | 4 | tools: 5 | external_code_coverage: true 6 | php_code_sniffer: 7 | enabled: true 8 | config: 9 | standard: PSR2 10 | filter: 11 | paths: ["src/*", "test/*"] 12 | php_cpd: 13 | enabled: true 14 | excluded_dirs: ["build/*", "docs", "test", "vendor"] 15 | php_cs_fixer: 16 | enabled: true 17 | config: 18 | level: all 19 | filter: 20 | paths: ["src/*", "test/*"] 21 | php_loc: 22 | enabled: true 23 | excluded_dirs: ["build", "docs", "test", "vendor"] 24 | php_mess_detector: 25 | enabled: true 26 | filter: 27 | paths: ["src/*"] 28 | php_pdepend: 29 | enabled: true 30 | excluded_dirs: ["build", "docs", "test", "vendor"] 31 | php_analyzer: true 32 | php_analyzer: 33 | filter: 34 | paths: ["src/*", "test/*"] 35 | sensiolabs_security_checker: true 36 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: php 2 | 3 | php: 4 | - 5.3 5 | - 5.4 6 | - 5.5 7 | - 5.6 8 | - hhvm 9 | 10 | matrix: 11 | allow_failures: 12 | - php: hhvm 13 | 14 | before_script: 15 | - composer self-update 16 | - composer install --dev --prefer-source 17 | 18 | script: 19 | - ./vendor/bin/phpunit 20 | - ./vendor/bin/phpcs --standard=PSR2 ./src/ ./test 21 | 22 | after_script: 23 | - php vendor/bin/coveralls -v 24 | - wget https://scrutinizer-ci.com/ocular.phar 25 | - php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # CI-Tools CHANGELOG 2 | 3 | ## Version 2.0.0 (2015-01-19) 4 | 5 | * Updated dependencies to new major versions 6 | * Added example to use Travis code coverage in Scrutinizer 7 | * Extended readme 8 | 9 | ## Version 1.0.0 (2014-04-02) 10 | 11 | * Added Travis example 12 | * Added Scrutinizer example 13 | * Addet unit test bootstrap example 14 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | New BSD License 2 | =============== 3 | 4 | Copyright (c) 2014, Sandro Keil 5 | All rights reserved. 6 | 7 | Redistribution and use in source and binary forms, with or without 8 | modification, are permitted provided that the following conditions are met: 9 | 10 | * Redistributions of source code must retain the above copyright notice, 11 | this list of conditions and the following disclaimer. 12 | * Redistributions in binary form must reproduce the above copyright notice, 13 | this list of conditions and the following disclaimer in the documentation 14 | and/or other materials provided with the distribution. 15 | * Neither the names of the copyright holders nor the names of its 16 | contributors may be used to endorse or promote products derived from this 17 | software without specific prior written permission. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 23 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 24 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 25 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 26 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 27 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 28 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 29 | POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # CI-Tools Composer meta package for PHP code 2 | 3 | > You want one repository which loads common PHP QA tools? 4 | 5 | > You want examples of all the beautiful services around GitHub for PHP analysis? 6 | 7 | > You want to be a badge poser? 8 | 9 | > This module comes to the rescue! 10 | 11 | [![Latest Stable Version](https://poser.pugx.org/sandrokeil/citools/v/stable.png)](https://packagist.org/packages/sandrokeil/citools) 12 | [![Dependency Status](https://www.versioneye.com/user/projects/540371b0eab62a132800014a/badge.svg)](https://www.versioneye.com/user/projects/540371b0eab62a132800014a) 13 | [![Total Downloads](https://poser.pugx.org/sandrokeil/citools/downloads.png)](https://packagist.org/packages/sandrokeil/easy-config) 14 | [![License](https://poser.pugx.org/sandrokeil/citools/license.png)](https://packagist.org/packages/sandrokeil/citools) 15 | 16 | The composer.json contains definitions of QA tools for [Travis-CI](https://travis-ci.org/), 17 | [Coveralls](https://coveralls.io/) and [Scrutinizer](https://scrutinizer-ci.com/) integration. So it's really easy to 18 | integrate these tools. 19 | 20 | ## Installation 21 | 22 | Installation of this module uses composer. For composer documentation, please refer to 23 | [getcomposer.org](http://getcomposer.org/). 24 | 25 | Put the following into your composer.json 26 | 27 | { 28 | "require-dev": { 29 | "sandrokeil/citools": "~2.0" 30 | } 31 | } 32 | 33 | ## Documentation 34 | 35 | See [.travis.yml](.travis.yml), [.scrutinizer.yml](.scrutinizer.yml) and [phpunit.xml.dist](phpunit.xml.dist) for an 36 | example configuration. See also [Bootstrap.php](test/Bootstrap.php) to initalize your ZF2 project for your tests. 37 | 38 | ## Continuous Integration/Inspection tools 39 | Register your repository on these services for PHP analysis. 40 | 41 | * [Travis-CI](https://travis-ci.org/) 42 | * [Scrutinizer](https://scrutinizer-ci.com/) 43 | * [Coveralls](https://coveralls.io/) 44 | * [VersionEye](https://www.versioneye.com) 45 | * [SensioLabsInsight](https://insight.sensiolabs.com/) 46 | * [PHP-CS-Fixer](https://github.com/FriendsOfPHP/PHP-CS-Fixer) 47 | 48 | ## Integrated libraries 49 | These PHP libraries are used to generate reports for above services. 50 | 51 | * [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit) 52 | * [phpunit/php-invoker](https://github.com/sebastianbergmann/php-invoker) 53 | * [phpmd/phpmd](https://github.com/phpmd/phpmd) 54 | * [squizlabs/php_codesniffer](https://github.com/squizlabs/PHP_CodeSniffer) 55 | * [satooshi/php-coveralls](https://github.com/satooshi/php-coveralls) 56 | 57 | ## Additional badges 58 | All continuous integration/inspection tools have its own badges but if you want to be a badge poser, here are more. 59 | 60 | * [Packagist](https://packagist.org/) - Register your repository here and other services will use it 61 | * [HHVM Status](http://hhvm.h4cc.de) - [HHVM](http://hhvm.com/) support badge 62 | * [Badge Poser](https://poser.pugx.org) - Several badges depending on repository 63 | * [Shields.io](http://shields.io/) - Custom badges 64 | * [Still Maintained](http://stillmaintained.com/) - Finally a place to mark your open source project 65 | as abandoned or looking for a new maintainer 66 | * [Issuestats.com](http://issuestats.com/) Analyze and compare how long it takes for GitHub issues to be closed 67 | 68 | ## Application access 69 | Some CI tools need access to your repository. Sign in with your GitHub login to grant access to your repository. Here 70 | is a list of webhooks and services which need access to your repository. 71 | 72 | ### Webhooks 73 | * https://scrutinizer-ci.com/github-callback (automatically created) 74 | * https://insight.sensiolabs.com/api/analyze-scm (automatically created) 75 | 76 | ### Services 77 | * Packagist (must be created manually, please follow instructions on the website) 78 | * Travis CI (must be created manually, please follow instructions on the website) 79 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "sandrokeil/citools", 3 | "description": "Composer meta package of QA tools for Travis, Coveralls and Scrutenizer", 4 | "homepage": "https://github.com/sandrokeil/citools", 5 | "license": "BSD-3-Clause", 6 | "type": "library", 7 | "keywords": [ 8 | "qa", 9 | "ci", 10 | "travis", 11 | "coveralls", 12 | "scrutenizer", 13 | "tools", 14 | "badges", 15 | "php" 16 | ], 17 | "authors": [ 18 | {"name": "Sandro Keil", "homepage": "https://github.com/sandrokeil"} 19 | ], 20 | "require": { 21 | "php": "~5.3", 22 | "phpunit/phpunit": "~4.1", 23 | "phpunit/php-invoker": "~1.1", 24 | "phpmd/phpmd": "~2.0", 25 | "squizlabs/php_codesniffer": "~2.0", 26 | "satooshi/php-coveralls": "~0.6" 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /phpunit.xml.dist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 13 | 14 | 15 | 16 | ./test 17 | 18 | 19 | 20 | 21 | 22 | ./config 23 | ./src 24 | 25 | 26 | 27 | 28 | 29 | 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /test/Bootstrap.php: -------------------------------------------------------------------------------- 1 |