From 0e1e2b7d639dcef45dd0540120d7aa379f7cad76 Mon Sep 17 00:00:00 2001 From: Danny van Kooten Date: Mon, 2 Mar 2015 19:35:56 +0700 Subject: [PATCH] Add CodeClimate test coverage reporter to Travis. Refactor tests into /tests subdirectory. --- .gitignore | 3 +++ .travis.yml | 11 +++++++++-- composer.json | 3 ++- phpunit.xml | 12 ++++++++++++ AltoRouterTest.php => tests/AltoRouterTest.php | 0 5 files changed, 26 insertions(+), 3 deletions(-) create mode 100644 phpunit.xml rename AltoRouterTest.php => tests/AltoRouterTest.php (100%) diff --git a/.gitignore b/.gitignore index 1d78478..8663f3f 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,6 @@ _site Gemfile Gemfile.lock +build +vendor +composer.lock diff --git a/.travis.yml b/.travis.yml index b2a9ddc..069e73c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,5 +5,12 @@ php: - 5.5 - 5.6 - hhvm - -script: phpunit --coverage-text ./ +install: + - composer install --dev +script: + - phpunit -c phpunit.xml +after_script: + - ./vendor/bin/test-reporter +env: + global: + secure: XnXSc7nxJMIrm/EJ1KuwlN4f+sj2R/sR0IFHdOdbOfMKyZ/u6WEgZ3vNrdeAsisiC/QUJJ00DGku1pAl3t3Hzvam0N/SiHtXjB1ZLVbX00S1PEZ6Z+h9zoaUBXWoN6+0OdKN0Xjmj2lwvTpvUxUZXNabilOw0F9WS/+JasofqBQ= diff --git a/composer.json b/composer.json index ebfa905..689592f 100644 --- a/composer.json +++ b/composer.json @@ -23,7 +23,8 @@ "php": ">=5.3.0" }, "require-dev": { - "phpunit/phpunit": "4.5.*" + "phpunit/phpunit": "4.5.*", + "codeclimate/php-test-reporter": "dev-master" }, "autoload": { "classmap": ["AltoRouter.php"] diff --git a/phpunit.xml b/phpunit.xml new file mode 100644 index 0000000..f978a4a --- /dev/null +++ b/phpunit.xml @@ -0,0 +1,12 @@ + + + + ./tests + + + + + + \ No newline at end of file diff --git a/AltoRouterTest.php b/tests/AltoRouterTest.php similarity index 100% rename from AltoRouterTest.php rename to tests/AltoRouterTest.php