smt/teamcity-integration

一个简单的脚本,用于为teamcity生成一些文件,例如单元测试报告等

v1.0.5 2015-09-08 14:55 UTC

This package is not auto-updated.

Last update: 2024-09-18 09:04:14 UTC


README

一个简单的脚本来与teamcity集成(生成报告)

安装

composer global require smt/teamcity-integration

现在您可以使用它了

使用方法

run-inspections PATH_TO_YOUR_PROJECT

配置

配置文件是可选的,但是如果您决定更改某些内容,您必须将其放置在项目根目录中,并命名为 ci.json

参考

{
    "inspections": { // Configuration for inspections (default below)
        "phpmd": { // Configuration for PHPMD
            "enabled": true, // Whether this inspection should be run
            "path": "phpmd", // How mess detector should be executed
            "format": "xml", // Output format
            "files": "src/", // Folder or files to process
            "resultPath": "res/mess.xml" // Path to file with report
            "inspections": [ // List of inspections of mess detector to enable
                "cleancode",
                "codesize",
                "controversial",
                "design",
                "naming",
                "unusedcode"
            ]
        },
        "phpcs": { // Configuration for CodeSniffer
            "enabled": true, // Whether this inspection should be run
            "path": "phpcs", // How CodeSniffer should be executed
            "files": "src/", // Folder or files to process
            "format": "checkstyle", // Output format
            "resultPath": "res/checkstyle.xml" // Path to file with report
        },
        "phpunit": { // Configuration for PHPUnit
            "enabled": true, // Whether this inspection should be run
            "path": "phpunit", // How PHPUnit should be executed
            "files": "src/", // Folder or files to process
            "bootstrap": "vendor/autoload.php", // Bootstrap file
            "configurationFile": null, // Configuration file for PHPUnit
            "format": "junit", // Test results output format
            "resultPath": "res/unit.xml", // Path to file with report about tests
            "coverage": { // Coverage configuration
                "format": "clover", // Output format
                "resultPath": "res/coverage.xml" // Path to file with report about coverage
            }
        }
    },
    "hooks": {
        "inspections": [ // Commands placed here would ran just before inspections starts
            "echo 'Some command here'"
        ],
        "cleanup": [ // Commands placed here would ran just before exit
            "echo 'Good Bye!'"
        ]
    }
}