File tree Expand file tree Collapse file tree 1 file changed +36
-5
lines changed
Expand file tree Collapse file tree 1 file changed +36
-5
lines changed Original file line number Diff line number Diff line change 1- name : PHP Composer
2-
1+ name : PHP
32on :
43 push :
5- branches : [ "main" ]
4+ branches :
5+ - " main"
66 pull_request :
7- branches : [ "main" ]
7+ branches :
8+ - " main"
89
910permissions :
10- contents : read
11+ contents : " read"
1112
1213jobs :
14+ lint :
15+ runs-on : " ubuntu-latest"
16+ strategy :
17+ matrix :
18+ php-version :
19+ - " 7.2"
20+ - " 7.4"
21+ - " 8.1"
22+ name : " PHP ${{ matrix.php-versions }} lint"
23+ steps :
24+ - # git checkout
25+ name : " Checkout code"
26+ uses : " actions/checkout@v3"
27+ - # setup PHP
28+ name : " Setup PHP"
29+ uses : " shivammathur/setup-php@v2"
30+ with :
31+ php-version : " ${{ matrix.php-version }}"
32+ - # check PHP version
33+ name : " Check PHP version"
34+ run : " php -v"
35+ - # run lint
36+ name : " Lint PHP files"
37+ run : |
38+ for file in $(find src/ -type f -name '*.php'); do
39+ echo -n "==> ${file}: ";
40+ php -l "${file}";
41+ done
1342 build :
1443
1544 runs-on : ubuntu-latest
1645
46+ name : " PHP composer & CodeSniffer"
47+
1748 steps :
1849 - uses : actions/checkout@v3
1950
You can’t perform that action at this time.
0 commit comments