File tree Expand file tree Collapse file tree 4 files changed +91
-30
lines changed Expand file tree Collapse file tree 4 files changed +91
-30
lines changed Original file line number Diff line number Diff line change 1+ name : Analyse
2+
3+ on :
4+ push :
5+ branches : [master]
6+ pull_request :
7+ branches : [master]
8+
9+ jobs :
10+ phpstan :
11+ runs-on : ubuntu-latest
12+
13+ steps :
14+ - name : Checkout code
15+ uses : actions/checkout@v4
16+
17+ - name : Setup PHP
18+ uses : shivammathur/setup-php@v2
19+ with :
20+ php-version : 8.3
21+
22+ - name : Cache Composer packages
23+ id : composer-cache
24+ uses : actions/cache@v4
25+ with :
26+ path : vendor
27+ key : ${{ runner.os }}-php-8.3-${{ hashFiles('**/composer.json') }}
28+ restore-keys : |
29+ ${{ runner.os }}-php-8.3-
30+
31+ - name : Install dependencies
32+ if : steps.composer-cache.outputs.cache-hit != 'true'
33+ run : |
34+ composer install --no-interaction --no-progress
35+ composer dump
36+
37+ - name : Run analyse phpstan
38+ run : vendor/bin/phpstan analyse --error-format github
Original file line number Diff line number Diff line change 1- name : Fix Styles
1+ name : Style fix
22
33on :
44 push :
55 branches : [master]
66
77jobs :
8- style :
8+ style-fix :
99 runs-on : ubuntu-latest
1010
1111 steps :
12- - uses : actions/checkout@v4
12+ - name : Checkout code
13+ uses : actions/checkout@v4
1314
1415 - name : Setup PHP
1516 uses : shivammathur/setup-php@v2
1617 with :
17- php-version : 8.2
18+ php-version : 8.3
19+
20+ - name : Cache Composer packages
21+ id : composer-cache
22+ uses : actions/cache@v4
23+ with :
24+ path : vendor
25+ key : ${{ runner.os }}-php-8.3-${{ hashFiles('**/composer.json') }}
26+ restore-keys : |
27+ ${{ runner.os }}-php-8.3-
1828
1929 - name : Install dependencies
30+ if : steps.composer-cache.outputs.cache-hit != 'true'
2031 run : |
21- composer install
32+ composer install --no-interaction --no-progress
2233 composer dump
2334
2435 - name : Fix styles
Original file line number Diff line number Diff line change 1- name : tests
1+ name : Tests
22
33on :
44 push :
88
99jobs :
1010 phpunit :
11-
1211 runs-on : ubuntu-latest
1312
1413 strategy :
14+ fail-fast : true
1515 matrix :
16- php : [8.3, 8.2, 8.1, 8.0]
17-
18- name : PHP${{ matrix.php }}
16+ php : [8.0, 8.1, 8.2, 8.3]
1917
2018 steps :
21- - uses : actions/checkout@v4
22-
23- - name : Setup PHP
24- uses : shivammathur/setup-php@v2
25- with :
26- php-version : ${{ matrix.php }}
27-
28- - name : Validate composer.json and composer.lock
29- run : composer validate
30-
31- - name : Install dependencies
32- run : |
33- composer install
34- composer dump
35-
36- - name : Run test phpunit
37- run : composer test
19+ - name : Checkout code
20+ uses : actions/checkout@v4
21+
22+ - name : Setup PHP
23+ uses : shivammathur/setup-php@v2
24+ with :
25+ php-version : ${{ matrix.php }}
26+
27+ - name : Validate composer.json
28+ run : composer validate
29+
30+ - name : Cache Composer packages
31+ id : composer-cache
32+ uses : actions/cache@v4
33+ with :
34+ path : vendor
35+ key : ${{ runner.os }}-php-${{ matrix.php }}-${{ hashFiles('**/composer.lock') }}
36+ restore-keys : |
37+ ${{ runner.os }}-php-${{ matrix.php }}-
38+
39+ - name : Install dependencies
40+ if : steps.composer-cache.outputs.cache-hit != 'true'
41+ run : |
42+ composer install --no-interaction --no-progress
43+ composer dump
44+
45+ - name : Run test phpunit
46+ run : vendor/bin/phpunit --stop-on-error --stop-on-failure
Original file line number Diff line number Diff line change 22 "name" : " descom/dev" ,
33 "description" : " Package to PHP Developer projects in Descom.es" ,
44 "type" : " library" ,
5- "keywords" : [" dev" ],
5+ "keywords" : [
6+ " dev"
7+ ],
68 "require" : {
79 "php" : " ^8.0"
810 },
2426 "prefer-stable" : true ,
2527 "require-dev" : {
2628 "friendsofphp/php-cs-fixer" : " ^3.35" ,
27- "phpunit/phpunit" : " ^9.5"
29+ "phpunit/phpunit" : " ^9.5|^10.0|^10.5" ,
30+ "phpstan/phpstan" : " ^1.8"
2831 },
2932 "autoload" : {
3033 "psr-4" : {
3841 "suggest" : {
3942 "friendsofphp/php-cs-fixer" : " Required to apply styles"
4043 }
41- }
44+ }
You can’t perform that action at this time.
0 commit comments