Skip to content

Migrate PHPUnit configuration #45

Migrate PHPUnit configuration

Migrate PHPUnit configuration #45

Workflow file for this run

name: CI
on: [ push, pull_request ]
jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
php: [ 8.3, 8.2, 8.1 ]
release: [ stable, lowest ]
include:
- php: 8.2
release: stable
coverage: xdebug
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 2
- uses: actions/cache@v3
with:
path: ~/.composer/cache/files
key: php-${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }}
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: bcmath, ctype, json, mbstring, openssl, pdo, pdo_sqlite, tokenizer, xml
coverage: ${{ matrix.coverage }}
- run: composer update --no-interaction --no-progress --prefer-dist --prefer-${{ matrix.release }}
- run: |
PHPUNIT_FLAGS=$([ "${{ matrix.coverage }}" == "xdebug" ] && echo "--coverage-clover=coverage.xml" || echo "")
vendor/bin/phpunit $PHPUNIT_FLAGS
- run: php tests/coverage/scrutinizer.php
if: matrix.coverage == 'xdebug'