Skip to content

Commit

Permalink
Merge pull request #9 from robiningelbrecht/test-different-phpunit-ve…
Browse files Browse the repository at this point in the history
…rsionbs

Test different php unit version
  • Loading branch information
robiningelbrecht committed Feb 19, 2024
2 parents 2b694fc + 1b37a41 commit e1a3bce
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
20 changes: 16 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,39 @@ 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 8.1 with Xdebug 3.x
- name: Setup PHP ${{ matrix.php-versions }} with Xdebug 3.x
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
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 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
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
],
"require": {
"php": "^8.1",
"nunomaduro/collision": "^7.8",
"nunomaduro/collision": "^7.8|^8.0",
"phpunit/phpunit": "^10.3|^11.0"
},
"autoload": {
Expand Down

0 comments on commit e1a3bce

Please sign in to comment.