Skip to content

Commit e1a3bce

Browse files
Merge pull request #9 from robiningelbrecht/test-different-phpunit-versionbs
Test different php unit version
2 parents 2b694fc + 1b37a41 commit e1a3bce

File tree

2 files changed

+17
-5
lines changed

2 files changed

+17
-5
lines changed

.github/workflows/ci.yml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,27 +6,39 @@ jobs:
66
test-suite:
77
name: PHPStan, PHPcs & Testsuite
88
runs-on: ubuntu-latest
9+
strategy:
10+
matrix:
11+
php-versions: [ '8.1', '8.2' ]
12+
phpunit-versions: [ '10.3', '11.0' ]
13+
exclude:
14+
- php-versions: 8.1
15+
phpunit-versions: 11.0
916

1017
steps:
1118
# https://github.com/marketplace/actions/setup-php-action
12-
- name: Setup PHP 8.1 with Xdebug 3.x
19+
- name: Setup PHP ${{ matrix.php-versions }} with Xdebug 3.x
1320
uses: shivammathur/setup-php@v2
1421
with:
15-
php-version: '8.1'
22+
php-version: ${{ matrix.php-versions }}
1623
coverage: xdebug
1724

1825
# https://github.com/marketplace/actions/checkout
1926
- name: Checkout code
2027
uses: actions/checkout@v3
2128

29+
- name: Install PHPUnit ${{ matrix.phpunit-versions }}
30+
run: |
31+
rm composer.lock
32+
composer require phpunit/phpunit ^${{ matrix.phpunit-versions }}
33+
2234
- name: Install dependencies
2335
run: composer install --prefer-dist
2436

2537
- name: Run PHPStan
2638
run: vendor/bin/phpstan analyse
2739

28-
- name: Run PHPcs fixer dry-run
29-
run: vendor/bin/php-cs-fixer fix --dry-run --stop-on-violation --config=.php-cs-fixer.dist.php
40+
#- name: Run PHPcs fixer dry-run
41+
# run: vendor/bin/php-cs-fixer fix --dry-run --stop-on-violation --config=.php-cs-fixer.dist.php
3042

3143
- name: Run test suite
3244
run: vendor/bin/phpunit --fail-on-incomplete --log-junit junit.xml --coverage-clover clover.xml

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
],
1717
"require": {
1818
"php": "^8.1",
19-
"nunomaduro/collision": "^7.8",
19+
"nunomaduro/collision": "^7.8|^8.0",
2020
"phpunit/phpunit": "^10.3|^11.0"
2121
},
2222
"autoload": {

0 commit comments

Comments
 (0)