File tree Expand file tree Collapse file tree 3 files changed +35
-1
lines changed Expand file tree Collapse file tree 3 files changed +35
-1
lines changed Original file line number Diff line number Diff line change 3131 - name : Setup tmate session
3232 if : ${{ github.event.inputs.tmate_enabled == 1 }}
3333 uses : mxschmitt/action-tmate@v3
34+
35+ tests :
36+ name : Unit tests
37+ runs-on : ubuntu-latest
38+ strategy :
39+ matrix :
40+ php-version : [8.2, 8.3, 8.4]
41+ steps :
42+ - name : Checkout
43+ uses : actions/checkout@v5
44+ - name : Setup PHP
45+ uses : shivammathur/setup-php@v2
46+ with :
47+ php-version : ${{ matrix.php-version }}
48+ - name : Composer install
49+ run : composer install
50+ - name : Run tests
51+ run : vendor/bin/phpunit -c phpunit.xml
Original file line number Diff line number Diff line change 2727 },
2828 "require-dev" : {
2929 "drupal/coder" : " ^8.3" ,
30- "squizlabs/php_codesniffer" : " ^3.4"
30+ "squizlabs/php_codesniffer" : " ^3.4" ,
31+ "phpunit/phpunit" : " ^12.4"
3132 },
3233 "scripts" : {
3334 "codesniff" : [
3940 " vendor/bin/phpcbf . --ignore=vendor src"
4041 ],
4142 "code:lint" : " find src -name '*.php' -print0 | xargs -0 -n1 php -l" ,
43+ "code:test" : [
44+ " vendor/bin/phpunit -c ./phpunit.xml"
45+ ],
4246 "pre-commit" : [
4347 " composer validate --strict" ,
4448 " @codesniff" ,
Original file line number Diff line number Diff line change 1+ <phpunit
2+ beStrictAboutTestsThatDoNotTestAnything =" true"
3+ beStrictAboutOutputDuringTests =" true"
4+ beStrictAboutChangesToGlobalState =" true"
5+ failOnWarning =" true"
6+ cacheResult =" false" >
7+ <testsuites >
8+ <testsuite name =" unit" >
9+ <directory >./tests/src/</directory >
10+ </testsuite >
11+ </testsuites >
12+ </phpunit >
You can’t perform that action at this time.
0 commit comments