Skip to content

Commit 06b38b9

Browse files
author
Takashi Matsuo
committed
Added coverage report.
1 parent 0f6b3cf commit 06b38b9

32 files changed

+883
-42
lines changed

.coveralls.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#.coveralls.yml
2+
3+
service_name: travis-ci
4+
5+
coverage_clover:
6+
- build/logs/clover-*.xml
7+
8+
json_path: build/logs/coveralls-upload.json
9+
exclude_no_stmt: true

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,5 @@
44
composer.phar
55
vendor/
66
credentials.*
7+
**/vendor/
8+
**/build/

.travis.yml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,36 +41,39 @@ script:
4141
# run bigquery tests
4242
- pushd bigquery/api
4343
- composer install
44-
- phpunit mainTest.php
45-
- phpunit utilTest.php
44+
- phpunit
4645
- popd
4746
# run datastore tests
4847
- pushd datastore
4948
- composer install
50-
- phpunit test
49+
- phpunit
5150
- popd
5251
# run pubsub tests
5352
- pushd pubsub
5453
- composer install
55-
- phpunit test
54+
- phpunit
5655
- popd
5756
# run storage tests
5857
- pushd storage/api
5958
- composer install
60-
- phpunit listBucketsTest.php
59+
- phpunit
6160
- popd
6261
# run mailgun tests
6362
- pushd appengine/standard/mailgun
6463
- composer install
65-
- phpunit test
64+
- phpunit
6665
- popd
6766
# run mailjet tests
6867
- pushd appengine/standard/mailjet
6968
- composer install
70-
- phpunit test
69+
- phpunit
7170
- popd
7271
# run cloudsql tests
7372
- pushd appengine/standard/cloudsql
7473
- composer install
75-
- phpunit test
74+
- phpunit
7675
- popd
76+
77+
after_script:
78+
- composer install
79+
- travis_retry php vendor/bin/coveralls -v

appengine/standard/cloudsql/index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@
2323

2424
// Run the app!
2525
// use "gcloud preview app deploy" or run "php -S localhost:8080"
26-
// and browse to "mailgun.php"
26+
// and browse to "index.php"
2727
$app['debug'] = true;
2828
$app->run();
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
xml version="1.0" encoding="UTF-8"?>
2+
17+
<phpunit bootstrap="test/bootstrap.php">
18+
<testsuites>
19+
<testsuite name="PHP cloudsql test">
20+
<directory>testdirectory>
21+
testsuite>
22+
testsuites>
23+
<logging>
24+
<log type="coverage-clover" target="../../../build/logs/clover-cloudsql.xml"/>
25+
logging>
26+
<filter>
27+
<whitelist>
28+
<file>app.phpfile>
29+
<file>createTables.phpfile>
30+
whitelist>
31+
filter>
32+
phpunit>
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
2+
3+
require_once __DIR__ . '/../vendor/autoload.php';

appengine/standard/cloudsql/test/cloudsqlTest.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,6 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17-
18-
// @TODO: use test bootstrap
19-
require_once __DIR__ . '/../vendor/autoload.php';
20-
2117
use Silex\WebTestCase;
2218

2319
class cloudsqlTest extends WebTestCase
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
xml version="1.0" encoding="UTF-8"?>
2+
17+
<phpunit bootstrap="test/bootstrap.php">
18+
<testsuites>
19+
<testsuite name="PHP mailgun test">
20+
<directory>testdirectory>
21+
testsuite>
22+
testsuites>
23+
<logging>
24+
<log type="coverage-clover" target="../../../build/logs/clover-mailgun.xml"/>
25+
logging>
26+
<filter>
27+
<whitelist>
28+
<file>functions.phpfile>
29+
<file>app.phpfile>
30+
whitelist>
31+
filter>
32+
phpunit>
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
2+
3+
require_once __DIR__ . '/../vendor/autoload.php';

appengine/standard/mailgun/test/mailgunTest.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17-
18-
require_once __DIR__ . '/../vendor/autoload.php';
19-
2017
use Silex\WebTestCase;
2118

2219
class mailgunTest extends WebTestCase

appengine/standard/mailjet/composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
22
"require": {
33
"silex/silex": "^1.3",
4-
"mailjet/mailjet-apiv3-php": "^1.1"
4+
"mailjet/mailjet-apiv3-php": "^1.1",
5+
"guzzlehttp/guzzle": "~6.1.0"
56
},
67
"require-dev": {
78
"symfony/browser-kit": "^3.0"

appengine/standard/mailjet/composer.lock

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

appengine/standard/mailjet/compsoer.lock

Whitespace-only changes.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
xml version="1.0" encoding="UTF-8"?>
2+
17+
<phpunit bootstrap="test/bootstrap.php">
18+
<testsuites>
19+
<testsuite name="PHP mailjet test">
20+
<directory>testdirectory>
21+
testsuite>
22+
testsuites>
23+
<logging>
24+
<log type="coverage-clover" target="../../../build/logs/clover-mailjet.xml"/>
25+
logging>
26+
<filter>
27+
<whitelist>
28+
<file>app.phpfile>
29+
whitelist>
30+
filter>
31+
phpunit>
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
2+
3+
require_once __DIR__ . '/../vendor/autoload.php';

appengine/standard/mailjet/test/mailjetTest.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17-
18-
require_once __DIR__ . '/../vendor/autoload.php';
19-
2017
use Silex\WebTestCase;
2118

2219
class mailjetTest extends WebTestCase

bigquery/api/phpunit.xml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
xml version="1.0" encoding="UTF-8"?>
2+
17+
<phpunit bootstrap="test/bootstrap.php">
18+
<testsuites>
19+
<testsuite name="PHP bigquery test">
20+
<directory>testdirectory>
21+
testsuite>
22+
testsuites>
23+
<logging>
24+
<log type="coverage-clover" target="../../build/logs/clover-bigquery.xml"/>
25+
logging>
26+
<filter>
27+
<whitelist>
28+
<file>main.phpfile>
29+
<file>util.phpfile>
30+
whitelist>
31+
filter>
32+
phpunit>

bigquery/api/test/bootstrap.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
2+
3+
require_once __DIR__ . '/../vendor/autoload.php';

bigquery/api/mainTest.php renamed to bigquery/api/test/mainTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public function test()
4141
$argc = 2;
4242
// Capture stdout.
4343
ob_start();
44-
include 'main.php';
44+
include __DIR__ . '/../main.php';
4545
$result = ob_get_contents();
4646
ob_end_clean();
4747
// Make sure it looks like Shakespeare.

bigquery/api/utilTest.php renamed to bigquery/api/test/utilTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17-
require 'util.php';
17+
require __DIR__ . '/../util.php';
1818

1919
class utilTest extends PHPUnit_Framework_TestCase
2020
{

composer.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"require": {
3+
"satooshi/php-coveralls": "^1.0"
4+
}
5+
}

0 commit comments

Comments
 (0)