Skip to content

Commit

Permalink
Fix tests³
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiang committed Nov 26, 2024
1 parent ab06d5b commit 1b24372
Showing 1 changed file with 27 additions and 4 deletions.
31 changes: 27 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,36 @@ jobs:

strategy:
matrix:
php_version: ['7.4', '8.0', '8.1', '8.2', '8.3', '8.4']
php:
- version: 7.4
coverage: false
composer-args: ''
- version: 8.0
coverage: false
composer-args: ''
- version: 8.1
coverage: false
composer-args: ''
- version: 8.2
coverage: false
composer-args: ''
- version: 8.3
coverage: true
composer-args: ''
- version: 8.4
coverage: false
composer-args: '--ignore-platform-req=php'
prefer-lowest: ['', '--prefer-lowest']

name: Unit Tests - PHP ${{ matrix.php_version }} ${{ matrix.prefer-lowest }}
name: Unit Tests - PHP ${{ matrix.php.version }} ${{ matrix.prefer-lowest }}

steps:
- uses: actions/checkout@v4

- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php_version }}
php-version: ${{ matrix.php.version }}

- name: Validate composer.json and composer.lock
run: composer validate --strict
Expand All @@ -69,7 +87,12 @@ jobs:
run: composer update --prefer-dist --no-progress --with-all-dependencies ${{ matrix.prefer-lowest }}

- name: Run test suite
run: ./vendor/bin/phpunit --order-by=random --coverage-clover=build/logs/clover.xml
if: ${{ ! matrix.php.coverage }}
run: ./vendor/bin/phpunit

- name: Run test suite with code coverage
if: ${{ matrix.php.coverage }}
run: ./vendor/bin/phpunit --coverage-clover=build/logs/clover.xml
env:
XDEBUG_MODE: coverage

Expand Down

0 comments on commit 1b24372

Please sign in to comment.