Skip to content

Commit 884ffe9

Browse files
committed
Update unit test configuration
- normalizes github actions yml based on the Dompdf project - adds support for phpunit 11
1 parent 6137b7d commit 884ffe9

File tree

3 files changed

+29
-34
lines changed

3 files changed

+29
-34
lines changed

.github/workflows/phpunit.yml

+28-33
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,38 @@
1-
name: PHPUnit tests
1+
name: "Run unit tests"
22

33
on:
4-
push:
5-
branches: [ master ]
6-
pull_request:
7-
branches: [ master ]
4+
- push
5+
- pull_request
6+
- workflow_dispatch
87

9-
jobs:
10-
php-version:
8+
env:
9+
COMPOSER_MEMORY_LIMIT: -1
1110

11+
jobs:
12+
test:
13+
name: "Build"
1214
runs-on: ubuntu-latest
1315

1416
strategy:
15-
fail-fast: false
17+
max-parallel: 12
1618
matrix:
17-
php-version:
18-
- "7.1"
19-
- "7.2"
20-
- "7.3"
21-
- "7.4"
22-
- "8.0"
23-
- "8.1"
24-
- "8.2"
25-
- "8.3"
26-
- "8.4"
19+
php: ['7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4']
20+
package-release: [dist]
2721

2822
steps:
29-
30-
- uses: actions/checkout@v4
31-
32-
- name: Install PHP
33-
uses: "shivammathur/setup-php@v2"
34-
with:
35-
php-version: "${{ matrix.php-version }}"
36-
coverage: "none"
37-
ini-values: "zend.assertions=1"
38-
39-
- name: Install Composer dependencies
40-
run: composer install --no-progress --ansi
41-
42-
- name: Run tests ${{ matrix.php-version }}
43-
run: SYMFONY_PHPUNIT_REMOVE_RETURN_TYPEHINT=1 bin/simple-phpunit --color=always
23+
- name: Checkout repository
24+
uses: actions/checkout@v4
25+
26+
- name: Setup PHP ${{ matrix.php }}
27+
uses: shivammathur/setup-php@v2
28+
with:
29+
php-version: ${{ matrix.php }}
30+
extensions: exif,json,mbstring,dom
31+
32+
- name: Install composer dependencies
33+
uses: ramsey/composer-install@v3
34+
with:
35+
dependency-versions: ${{ matrix.package-release }}
36+
37+
- name: Run unit tests
38+
run: ./vendor/bin/phpunit

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,6 @@
2828
"ext-mbstring": "*"
2929
},
3030
"require-dev": {
31-
"symfony/phpunit-bridge" : "^3 || ^4 || ^5 || ^6"
31+
"phpunit/phpunit": "^7.5 || ^8 || ^9 || ^10 || ^11"
3232
}
3333
}

phpunit.xml.dist phpunit.xml

File renamed without changes.

0 commit comments

Comments
 (0)