From c340222c23ca24934a58f9aa3343f02df9494f6e Mon Sep 17 00:00:00 2001 From: Laravel Freelancer NL <36150929+LaravelFreelancerNL@users.noreply.github.com> Date: Sat, 29 Aug 2020 15:36:47 +0200 Subject: [PATCH] Devops/coverage (#11) * Create coverage.yml * Update coverage.yml --- .github/workflows/coverage.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/coverage.yml diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml new file mode 100644 index 0000000..245adc3 --- /dev/null +++ b/.github/workflows/coverage.yml @@ -0,0 +1,28 @@ +name: Test Coverage + +on: [workflow_dispatch, push, pull_request] + +jobs: + run: + runs-on: ubuntu-18.04 + name: Test coverage + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: '7.2' + extensions: mbstring, intl + ini-values: post_max_size=256M, short_open_tag=On + coverage: xdebug + + - name: Install dependencies + run: composer install --prefer-dist --no-progress --no-suggest + + - name: Test coverage + run: | + vendor/bin/phpunit --coverage-clover clover.xml --whitelist src + wget https://scrutinizer-ci.com/ocular.phar + php ocular.phar code-coverage:upload --format=php-clover clover.xml