File tree Expand file tree Collapse file tree 4 files changed +40
-2
lines changed Expand file tree Collapse file tree 4 files changed +40
-2
lines changed Original file line number Diff line number Diff line change 1+ * @ m0hanraj
Original file line number Diff line number Diff line change 1+ name : PHP
2+
3+ on : [push, pull_request]
4+
5+ jobs :
6+ lint-test :
7+
8+ runs-on : ubuntu-latest
9+
10+ steps :
11+ - uses : actions/checkout@v4
12+
13+ - name : Setup PHP
14+ uses : shivammathur/setup-php@v2
15+ with :
16+ php-version : ' 8.2'
17+ extensions : xdebug
18+ coverage : xdebug
19+ tools : composer:v2
20+
21+ - name : Validate composer.json and composer.lock
22+ run : composer validate
23+
24+ - name : Install dependencies
25+ run : composer install --prefer-dist --no-progress
26+
27+ - name : Run PHPCS Lint
28+ run : composer lint
29+
30+ - name : Run PHPUnit tests
31+ run : composer test
32+
33+ - name : Upload coverage report
34+ uses : actions/upload-artifact@v4
35+ with :
36+ name : coverage-report
37+ path : coverage/
Original file line number Diff line number Diff line change 3030 "scripts" : {
3131 "lint" : " phpcs --ignore=/vendor/* --standard=PSR12 ." ,
3232 "lint:fix" : " phpcbf --ignore=/vendor/* --standard=PSR12 ." ,
33- "test" : " phpunit --testdox --coverage-clover coverage/clover.xml --coverage-filter src/"
33+ "test" : " phpunit --testdox --coverage-clover coverage/clover.xml --coverage-html coverage --coverage- filter src/"
3434 }
3535}
Original file line number Diff line number Diff line change 22<phpunit xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" xsi : noNamespaceSchemaLocation =" https://schema.phpunit.de/11.1/phpunit.xsd" bootstrap =" vendor/autoload.php" colors =" true" columns =" max" cacheDirectory =" .phpunit.cache" >
33 <testsuites >
44 <testsuite name =" unit" >
5- <directory suffix =" .php" >./Tests /</directory >
5+ <directory suffix =" .php" >./tests /</directory >
66 </testsuite >
77 </testsuites >
88 <source >
You can’t perform that action at this time.
0 commit comments