From 0a70c89e75c21593f9dee73cfe58cd8bffa1fc3e Mon Sep 17 00:00:00 2001 From: Dmitry Khomutov Date: Thu, 19 May 2016 21:25:43 +0600 Subject: [PATCH] Fixed configs --- .gitignore | 16 ++-------- .phpci.yml | 60 +++++++++++++++++++----------------- tests/bootstrap.php | 74 +++++++++++++++++++++++++++++++-------------- 3 files changed, 86 insertions(+), 64 deletions(-) diff --git a/.gitignore b/.gitignore index 90ebd84b..39844871 100644 --- a/.gitignore +++ b/.gitignore @@ -1,20 +1,8 @@ -/.idea -/vendor/ +/vendor /composer.phar -/.DS_Store -/.settings -/.project -/.buildpath -/app/config.yml /runtime/builds /runtime/daemon -/public/.htaccess -/cache /app/loggerconfig.php /app/pluginconfig.php -/src/PHPCI/Model/Migration.php -/src/PHPCI/Model/Base/MigrationBase.php -/src/PHPCI/Store/MigrationStore.php -/src/PHPCI/Store/Base/MigrationStoreBase.php -/local_vars.php +/app/config.yml /tests/PHPCI/config.yml diff --git a/.phpci.yml b/.phpci.yml index e62f9bce..2f04e827 100644 --- a/.phpci.yml +++ b/.phpci.yml @@ -1,38 +1,42 @@ build_settings: - verbose: false ignore: - - "vendor" - - "Tests" - - "PHPCI/Command" # PHPMD complains about un-used parameters, but they are required. - - "public/install.php" # PHPCS really doesn't like PHP mixed with HTML (and so it shouldn't) - - "PHPCI/Migrations" # Ignore the migrations directory, as both PHPMD and PHPCS can't cope with them. - - "PHPCI/Model/Base" # These files are auto-generated, and sometimes hit PHPMD complexity thresholds. - - "PHPCI/Languages" # PHPCS fails on character counts for non-Latin languages - - "public/assets" # If there are any PHP files in here, we didn't write them. + - vendor + - tests setup: composer: - action: "install" + action: install test: - php_parallel_lint: - ignore: - # Only ignore vendor - - vendor/ - php_mess_detector: - allowed_warnings: 0 - rules: - - phpmd.xml - php_code_sniffer: - standard: phpcs.xml - allowed_warnings: 0 - allowed_errors: 0 - php_loc: php_unit: - php_docblock_checker: - allowed_warnings: 0 + config: + - phpunit.xml + coverage: coverage -broken: + php_mess_detector: + allow_failures: true + + php_code_sniffer: + standard: PSR2 + encoding: UTF-8 + allow_failures: true + + php_cpd: + allow_failures: true + + php_loc: + allow_failures: true + + php_parallel_lint: + allow_failures: true + + php_docblock_checker: + allow_failures: true + +failure: email: - #committer: true - #cc: ["php-ci@googlegroups.com"] + committer: true + +complete: + email: + default_mailto_address: poisoncorpsee@gmail.com diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 46c513df..a16f669b 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -1,43 +1,73 @@ loadYaml($configFile); } -require_once(dirname(__DIR__) . '/vars.php'); +if (!defined('PHPCI_URL') && !empty($config)) { + define('PHPCI_URL', $config->get('phpci.url', '') . '/'); +} + +if (!defined('PHPCI_IS_CONSOLE')) { + define('PHPCI_IS_CONSOLE', false); +} \PHPCI\Helper\Lang::init($config); -\PHPCI\Helper\Lang::setLanguage("en");