.github/workflows/coverage_report.yml
# Run coverage report and upload it to CodeClimate
name: Coverage
on:
push:
branches: [master]
jobs:
coverage:
name: coverage
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@v2
with:
php-version: 7.4
extensions: mbstring, dom, json, libxml, xml, xmlwriter
coverage: xdebug
- name: Install dependencies
run: composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader
- name: Test & publish code coverage
uses: paambaati/codeclimate-action@v2.3.0
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
with:
coverageCommand: "composer coverage:clover"