From c60d41427db94aca2ec8d2577d52ba55bef12640 Mon Sep 17 00:00:00 2001 From: eai04191 Date: Wed, 26 Jun 2019 15:31:14 +0900 Subject: [PATCH] Add codecov --- .circleci/config.yml | 11 ++++++++++- Dockerfile | 1 + 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 0c04d93..d903d58 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,4 +1,5 @@ version: 2 + jobs: build: docker: @@ -67,7 +68,15 @@ jobs: - run: command: | 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 - store_test_results: 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 diff --git a/Dockerfile b/Dockerfile index 565fba1..c048cea 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,6 +8,7 @@ RUN apt-get update \ && apt-get install -y git libpq-dev unzip \ && docker-php-ext-install pdo_pgsql \ && pecl install xdebug \ + && docker-php-ext-enable xdebug \ && curl -sS https://getcomposer.org/installer | php \ && mv composer.phar /usr/local/bin/composer \ && sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf \