From 7ca59c9ae78ee484836cb23f79da714a619ec70b Mon Sep 17 00:00:00 2001 From: Andrew Coulton Date: Wed, 17 Sep 2014 17:38:25 +0100 Subject: [PATCH] Configure standalone travis build Adds and configures kohana/koharness to build a skeleton Kohana application and then uses that environment to run the unit tests on travis (and locally, if required). Continues kohana/kohana#50 --- .gitignore | 3 +++ .travis.yml | 24 ++++++++++++++++++++++++ composer.json | 8 ++++++++ koharness.php | 8 ++++++++ 4 files changed, 43 insertions(+) create mode 100644 .travis.yml create mode 100644 koharness.php diff --git a/.gitignore b/.gitignore index aa44e5e..dacab95 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,6 @@ Icon? code_coverage *~ *.swp +composer.lock +vendor/* +koharness_bootstrap.php diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..8f9e0fc --- /dev/null +++ b/.travis.yml @@ -0,0 +1,24 @@ +language: php + +php: + - 5.3 + - 5.4 + - 5.5 + - 5.6 + - hhvm + +before_script: + - composer install --prefer-dist + - vendor/bin/koharness + +script: + - cd /tmp/koharness && ./vendor/bin/phpunit --bootstrap=modules/unittest/bootstrap.php modules/unittest/tests.php + +notifications: + irc: + channels: + - "irc.freenode.org#kohana" + template: + - "%{repository}/%{branch} (%{commit}) - %{author}: %{message}" + - "Build details: %{build_url}" + email: false diff --git a/composer.json b/composer.json index c35732f..0313feb 100644 --- a/composer.json +++ b/composer.json @@ -24,10 +24,18 @@ "kohana/core": ">=3.3", "php": ">=5.3.3" }, + "require-dev": { + "kohana/core": "3.3.*@dev", + "kohana/unittest": "3.3.*@dev", + "kohana/koharness": "*@dev" + }, "extra": { "branch-alias": { "dev-3.3/develop": "3.3.x-dev", "dev-3.4/develop": "3.4.x-dev" + }, + "installer-paths": { + "vendor/{$vendor}/{$name}": ["type:kohana-module"] } } } diff --git a/koharness.php b/koharness.php new file mode 100644 index 0000000..5f51a74 --- /dev/null +++ b/koharness.php @@ -0,0 +1,8 @@ + array( + 'auth' => __DIR__, + 'unittest' => __DIR__ . '/vendor/kohana/unittest' + ), +);