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 30
30
"scripts" : {
31
31
"lint" : " phpcs --ignore=/vendor/* --standard=PSR12 ." ,
32
32
"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/"
34
34
}
35
35
}
Original file line number Diff line number Diff line change 2
2
<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" >
3
3
<testsuites >
4
4
<testsuite name =" unit" >
5
- <directory suffix =" .php" >./Tests /</directory >
5
+ <directory suffix =" .php" >./tests /</directory >
6
6
</testsuite >
7
7
</testsuites >
8
8
<source >
You can’t perform that action at this time.
0 commit comments