Added github action workflow to upload code coverage to Scrutinizer #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | ||
workflow_run: | ||
workflows: [Lint and Test] | ||
types: [completed] | ||
jobs: | ||
scrutinize: | ||
runs-on: ubuntu-latest | ||
if: ${{ github.event.workflow_run.conclusion == 'success' }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Cache Composer packages | ||
uses: actions/cache@v3 | ||
with: | ||
path: vendor | ||
key: ${{ runner.os }}-php-${{ matrix.php_version}}-${{ hashFiles('**/composer.lock') }} | ||
- name: Install dependencies | ||
uses: php-actions/composer@v6 | ||
- name: Generate PHP tests coverage | ||
run: XDEBUG_MODE=coverage vendor/bin/phpunit --coverage-clover coverage.clover | ||
- name: Upload Scrutinizer coverage | ||
uses: sudo-bot/action-scrutinizer@latest | ||
with: | ||
cli-args: "--format=php-clover ./clover.xml | ||