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+
<!--
3+
Copyright 2016 Google Inc.
4+
5+
Licensed under the Apache License, Version 2.0 (the "License");
6+
you may not use this file except in compliance with the License.
7+
You may obtain a copy of the License at
8+
9+
http://www.apache.org/licenses/LICENSE-2.0
10+
11+
Unless required by applicable law or agreed to in writing, software
12+
distributed under the License is distributed on an "AS IS" BASIS,
13+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
See the License for the specific language governing permissions and
15+
limitations under the License.
16+
-->
17+
<phpunit bootstrap="test/bootstrap.php">
18+
<testsuites>
19+
<testsuite name="PHP cloudsql test">
20+
<directory>test</directory>
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.php</file>
29+
<file>createTables.php</file>
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+
<?php
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+
<!--
3+
Copyright 2016 Google Inc.
4+
5+
Licensed under the Apache License, Version 2.0 (the "License");
6+
you may not use this file except in compliance with the License.
7+
You may obtain a copy of the License at
8+
9+
http://www.apache.org/licenses/LICENSE-2.0
10+
11+
Unless required by applicable law or agreed to in writing, software
12+
distributed under the License is distributed on an "AS IS" BASIS,
13+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
See the License for the specific language governing permissions and
15+
limitations under the License.
16+
-->
17+
<phpunit bootstrap="test/bootstrap.php">
18+
<testsuites>
19+
<testsuite name="PHP mailgun test">
20+
<directory>test</directory>
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.php</file>
29+
<file>app.php</file>
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+
<?php
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

0 commit comments

Comments
 (0)