Skip to content

Commit dfe6243

Browse files
author
Eugene Leonovich
committed
Fix coverage generation
1 parent 15c7c29 commit dfe6243

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
/vendor/
22
/composer.lock
3-
/coverage.clover
3+
/coverage.*
44
/phpunit.xml

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ services:
88
env:
99
- PHP_RUNTIME='php:5.4-cli'
1010
- PHP_RUNTIME='php:5.5-cli'
11-
- PHP_RUNTIME='php:5.6-cli' PHPUNIT_OPTS='--coverage-clover coverage.clover'
11+
- PHP_RUNTIME='php:5.6-cli' PHPUNIT_OPTS='--coverage-clover=coverage.clover'
1212

1313
before_install:
1414
# https://github.com/travis-ci/travis-ci/issues/4778
@@ -20,7 +20,7 @@ install:
2020

2121
script:
2222
- docker run -d --name tarantool -v $(pwd):/queue tarantool/tarantool /queue/tests/Integration/instance.lua
23-
- docker run --rm --name queue --link tarantool -v $(pwd):/queue -w /queue queue
23+
- docker run --rm --name queue --link tarantool -v $(pwd):/queue -w /queue -e PHPUNIT_OPTS="$PHPUNIT_OPTS" queue
2424

2525
after_script:
2626
- docker run --rm --name queue -v $(pwd):/queue -w /queue queue bash -c "

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,8 @@ To run only integration or unit tests, set the `PHPUNIT_OPTS` environment variab
240240
to either `--testsuite Integration` or `--testsuite Unit` respectively, e.g.:
241241

242242
```sh
243-
$ PHPUNIT_OPTS='--testsuite Unit' docker run --rm --name queue -v $(pwd):/queue -w /queue queue
243+
$ docker run --rm --name queue -v $(pwd):/queue -w /queue \
244+
-e PHPUNIT_OPTS='--testsuite Unit' queue
244245
```
245246

246247

dockerfile.sh

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ if [[ $PHP_RUNTIME == php* ]]; then
1111
RUN_CMDS="$RUN_CMDS && \\\\\n docker-php-ext-install zip tarantool"
1212
fi
1313

14-
if [[ $PHPUNIT_OPTS =~ (^|[[:space:]])--clover-[[:alpha:]] ]]; then
14+
if [[ $PHPUNIT_OPTS =~ (^|[[:space:]])--coverage-[[:alpha:]] ]]; then
1515
RUN_CMDS="$RUN_CMDS && \\\\\n git clone https://github.com/xdebug/xdebug.git /usr/src/php/ext/xdebug"
1616
RUN_CMDS="$RUN_CMDS && \\\\\n docker-php-ext-install xdebug"
1717
fi
@@ -24,9 +24,8 @@ RUN apt-get update && \\
2424
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer && \\
2525
composer global require 'phpunit/phpunit:^4.8|^5.0'
2626
27-
ENV PATH ~/.composer/vendor/bin:\$PATH
28-
ENV TARANTOOL_HOST=tarantool
29-
ENV TARANTOOL_PORT=3301
27+
ENV PATH=~/.composer/vendor/bin:\$PATH
28+
ENV TARANTOOL_HOST=tarantool TARANTOOL_PORT=3301
3029
31-
CMD if [ ! -f composer.lock ]; then composer install; fi && ~/.composer/vendor/bin/phpunit${PHPUNIT_OPTS:+ }$PHPUNIT_OPTS
30+
CMD if [ ! -f composer.lock ]; then composer install; fi && ~/.composer/vendor/bin/phpunit\${PHPUNIT_OPTS:+ }\$PHPUNIT_OPTS
3231
"

0 commit comments

Comments
 (0)