File tree Expand file tree Collapse file tree 7 files changed +920
-41
lines changed
Expand file tree Collapse file tree 7 files changed +920
-41
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ name : PHP validate and Unit Test
2+
3+ on :
4+ push :
5+ pull_request :
6+
7+ concurrency :
8+ group : test
9+
10+ permissions :
11+ contents : read
12+
13+ jobs :
14+ test :
15+ runs-on : ubuntu-latest
16+
17+ steps :
18+ - name : Checkout code
19+ uses : actions/checkout@v3
20+
21+ - name : Validate composer.json and composer.lock
22+ run : composer validate --strict
23+
24+ - name : Cache Composer packages
25+ id : composer-cache
26+ uses : actions/cache@v3
27+
28+ - name : Create Environments
29+ run : echo "${{ secrets.TEST_ENV_VARIABLES }}" > .env
30+
31+ - name : Install and update Composer packages
32+ run : composer run-script install-dependencies
33+
34+ - name : Run test suite
35+ run : composer run-script phpunit-test
36+
37+ validate :
38+ runs-on : ubuntu-latest
39+
40+ steps :
41+ - name : Setup PHP
42+ uses : shivammathur/setup-php@15c43e89cdef867065b0213be354c2841860869e
43+ with :
44+ php-version : ' 8.3'
45+
46+ - name : Checkout code
47+ uses : actions/checkout@v3
48+
49+ - name : Validate PHP version
50+ run : php -v
51+
52+ - name : Cache Composer packages
53+ id : composer-cache
54+ uses : actions/cache@v3
55+
56+ - name : Install and update Composer packages
57+ run : composer install --ignore-platform-reqs
58+
59+ - name : Run PHP mess detector
60+ run : composer run-script mess-detect
Original file line number Diff line number Diff line change 2828 "minimum-stability" : " dev" ,
2929 "prefer-stable" : true ,
3030 "scripts" : {
31- "install-dependencies" : " composer install --prefer-source" ,
32- "phpunit-test" : " vendor/bin/phpunit --colors=always --configuration phpunit.xml"
31+ "install-dependencies" : " composer install --ignore-platform-reqs" ,
32+ "phpunit-test" : " vendor/bin/phpunit --colors=always --configuration phpunit.xml" ,
33+ "mess-detect" : " vendor/bin/phpmd ./src text phpmd.xml"
3334 },
3435 "require" : {
3536 "php" : " >=8.0" ,
4142 },
4243 "require-dev" : {
4344 "fakerphp/faker" : " ^1.23" ,
45+ "phpmd/phpmd" : " ^2.15" ,
4446 "phpunit/phpunit" : " ^9.5" ,
4547 "psr/log" : " ^1.1|^2.0|^3.0"
4648 },
You can’t perform that action at this time.
0 commit comments