Skip to content

Commit

Permalink
chore: allow code coverage (#186)
Browse files Browse the repository at this point in the history
  • Loading branch information
taka-oyama authored Feb 21, 2024
1 parent 6ffd240 commit c73498c
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 5 deletions.
11 changes: 6 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
.env
.idea
.phpunit.cache
vendor
composer.lock
/.env
/.idea
/.phpunit.cache
/coverage
/vendor
/composer.lock

# don't commit gcp service accounts
key.json
Expand Down
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ RUN pecl_mt_install() { \
&& docker-php-ext-install -j$(nproc) bcmath gmp \
&& pecl_mt_install protobuf \
&& pecl_mt_install grpc \
&& pecl_mt_install pcov \
&& docker-php-ext-enable grpc opcache protobuf \
&& apk del .build-deps \
&& rm -rf /tmp/* \
Expand Down
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
},
"scripts": {
"analyze": "phpstan analyse --configuration phpstan.neon --memory-limit=-1",
"coverage": "phpunit --coverage-html=coverage",
"test": "phpunit"
},
"suggest": {
Expand Down
6 changes: 6 additions & 0 deletions phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,10 @@
<env name="DB_SPANNER_INSTANCE_ID" value="test-instance"/>
<env name="DB_SPANNER_DATABASE_ID" value="test-database"/>
</php>
<coverage/>
<source>
<include>
<directory suffix=".php">./src</directory>
</include>
</source>
</phpunit>

0 comments on commit c73498c

Please sign in to comment.