Skip to content

Commit d41c160

Browse files
committed
Introduce an integration with code coverage tracking service
1 parent 9d3e0e7 commit d41c160

File tree

4 files changed

+11
-0
lines changed

4 files changed

+11
-0
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@
44
# tests
55
/phpunit.xml
66
/.phpunit.result.cache
7+
/coverage.xml

.travis.yml

+3
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,6 @@ services: docker
33
script:
44
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
55
- docker-compose run tests
6+
7+
after_success:
8+
- bash <(curl -s https://codecov.io/bash)

Dockerfile

+3
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,7 @@ FROM php:7.3-cli
33
RUN apt-get update \
44
&& apt-get install -y unzip \
55
&& docker-php-ext-install pcntl \
6+
&& pecl install xdebug \
7+
&& echo "zend_extension=xdebug.so" > /usr/local/etc/php/conf.d/xdebug.ini \
8+
&& echo "xdebug.mode=coverage" >> /usr/local/etc/php/conf.d/xdebug.ini \
69
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer

phpunit.xml.dist

+4
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,8 @@
2222
<env name="REMOTE_URL" value=""/>
2323
<env name="REMOTE_PASSWORD" value=""/>
2424
</php>
25+
26+
<logging>
27+
<log type="coverage-clover" target="coverage.xml"/>
28+
</logging>
2529
</phpunit>

0 commit comments

Comments
 (0)