Add codecov

This commit is contained in:
eai04191 2019-06-26 15:31:14 +09:00
parent cb1b2c9902
commit c60d41427d
2 changed files with 11 additions and 1 deletions

View File

@ -1,4 +1,5 @@
version: 2 version: 2
jobs: jobs:
build: build:
docker: docker:
@ -67,7 +68,15 @@ jobs:
- run: - run:
command: | command: |
mkdir -p /tmp/phpunit mkdir -p /tmp/phpunit
./vendor/bin/phpunit --log-junit /tmp/phpunit/phpunit.xml ./vendor/bin/phpunit --log-junit /tmp/phpunit/phpunit.xml --coverage-clover=/tmp/phpunit/coverage.xml
when: always when: always
- store_test_results: - store_test_results:
path: /tmp/phpunit path: /tmp/phpunit
- store_artifacts:
path: /tmp/phpunit/coverage.xml
# Upload coverage
- run:
command: |
bash <(curl -s https://codecov.io/bash) -f /tmp/phpunit/coverage.xml
when: always

View File

@ -8,6 +8,7 @@ RUN apt-get update \
&& apt-get install -y git libpq-dev unzip \ && apt-get install -y git libpq-dev unzip \
&& docker-php-ext-install pdo_pgsql \ && docker-php-ext-install pdo_pgsql \
&& pecl install xdebug \ && pecl install xdebug \
&& docker-php-ext-enable xdebug \
&& curl -sS https://getcomposer.org/installer | php \ && curl -sS https://getcomposer.org/installer | php \
&& mv composer.phar /usr/local/bin/composer \ && mv composer.phar /usr/local/bin/composer \
&& sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf \ && sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf \