Skip to content

Test different php unit version #26

Test different php unit version

Test different php unit version #26

Workflow file for this run

name: CI
on:
pull_request:
workflow_dispatch:
jobs:
test-suite:
name: PHPStan, PHPcs & Testsuite
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: [ '8.1', '8.2' ]
phpunit-versions: [ '10.3', '11.0' ]
exclude:
- php-versions: 8.1
phpunit-versions: 11.0
steps:
# https://github.com/marketplace/actions/setup-php-action
- name: Setup PHP ${{ matrix.php-versions }} with Xdebug 3.x
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
coverage: xdebug
# https://github.com/marketplace/actions/checkout
- name: Checkout code
uses: actions/checkout@v3
- name: Install PHPUnit ${{ matrix.phpunit-versions }}
run: |
rm composer.lock
composer require phpunit/phpunit ^${{ matrix.phpunit-versions }}
- name: Install dependencies
run: composer install --prefer-dist
- name: Run PHPStan
run: vendor/bin/phpstan analyse
#- name: Run PHPcs fixer dry-run
# run: vendor/bin/php-cs-fixer fix --dry-run --stop-on-violation --config=.php-cs-fixer.dist.php
- name: Run test suite
run: vendor/bin/phpunit --fail-on-incomplete --log-junit junit.xml --coverage-clover clover.xml
# https://github.com/marketplace/actions/codecov
- name: Send test coverage to codecov.io
uses: codecov/codecov-action@v3
with:
files: clover.xml
fail_ci_if_error: true # optional (default = false)
verbose: true # optional (default = false)