Skip to content

Upload coverage to scrutinizer #43

Upload coverage to scrutinizer

Upload coverage to scrutinizer #43

Workflow file for this run

name: PHP
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
run:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- php: 8.2
composer: '--prefer-lowest'
desc: "Lowest versions"
- php: 8.2
coverage: '--coverage-clover ./clover.xml'
- php: 8.3
name: PHP ${{ matrix.php }} ${{ matrix.desc }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 10
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: xdebug
- name: Validate composer.json and composer.lock
run: composer validate
- name: Install dependencies
run: composer update --prefer-dist --no-progress ${{ matrix.composer }}
- name: Run PHPUnit
run: vendor/bin/phpunit ${{ matrix.coverage }}
- name: Upload Scrutinizer coverage
uses: sudo-bot/action-scrutinizer@latest
if: ${{ matrix.coverage }}
with:
cli-args: "--format=php-clover ./clover.xml"