Skip to content

Commit 7ca59c9

Browse files
committed
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
1 parent 4ebae51 commit 7ca59c9

File tree

4 files changed

+43
-0
lines changed

4 files changed

+43
-0
lines changed

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,6 @@ Icon?
44
code_coverage
55
*~
66
*.swp
7+
composer.lock
8+
vendor/*
9+
koharness_bootstrap.php

.travis.yml

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
language: php
2+
3+
php:
4+
- 5.3
5+
- 5.4
6+
- 5.5
7+
- 5.6
8+
- hhvm
9+
10+
before_script:
11+
- composer install --prefer-dist
12+
- vendor/bin/koharness
13+
14+
script:
15+
- cd /tmp/koharness && ./vendor/bin/phpunit --bootstrap=modules/unittest/bootstrap.php modules/unittest/tests.php
16+
17+
notifications:
18+
irc:
19+
channels:
20+
- "irc.freenode.org#kohana"
21+
template:
22+
- "%{repository}/%{branch} (%{commit}) - %{author}: %{message}"
23+
- "Build details: %{build_url}"
24+
email: false

composer.json

+8
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,18 @@
2424
"kohana/core": ">=3.3",
2525
"php": ">=5.3.3"
2626
},
27+
"require-dev": {
28+
"kohana/core": "3.3.*@dev",
29+
"kohana/unittest": "3.3.*@dev",
30+
"kohana/koharness": "*@dev"
31+
},
2732
"extra": {
2833
"branch-alias": {
2934
"dev-3.3/develop": "3.3.x-dev",
3035
"dev-3.4/develop": "3.4.x-dev"
36+
},
37+
"installer-paths": {
38+
"vendor/{$vendor}/{$name}": ["type:kohana-module"]
3139
}
3240
}
3341
}

koharness.php

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?php
2+
// Configuration for koharness - builds a standalone skeleton Kohana app for running unit tests
3+
return array(
4+
'modules' => array(
5+
'auth' => __DIR__,
6+
'unittest' => __DIR__ . '/vendor/kohana/unittest'
7+
),
8+
);

0 commit comments

Comments
 (0)