11# https://help.github.com/en/categories/automating-your-workflow-with-github-actions
22
33on :
4- pull_request :
54 push :
5+ branches :
6+ - main
7+ pull_request :
68 schedule :
79 - cron : ' 3 3 * * 1'
810
@@ -11,14 +13,14 @@ name: CI
1113jobs :
1214 php-lint :
1315 name : PHP Lint
14- runs-on : ubuntu-20 .04
16+ runs-on : ubuntu-22 .04
1517 strategy :
1618 matrix :
17- php-version : [ '5.6', '7.0', '7.1', '7. 2', '7.3', '7.4', '8.0', '8.1', '8.2' ]
19+ php-version : [ '7. 2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3 ' ]
1820
1921 steps :
2022 - name : Checkout
21- uses : actions/checkout@v3
23+ uses : actions/checkout@v4
2224
2325 - name : Install PHP
2426 uses : shivammathur/setup-php@v2
@@ -32,32 +34,32 @@ jobs:
3234 unit-tests :
3335 name : Unit tests
3436
35- runs-on : ubuntu-20 .04
37+ runs-on : ubuntu-22 .04
3638
3739 needs : [ php-lint ]
3840
3941 strategy :
4042 fail-fast : false
4143 matrix :
42- php-version : [ '5.6', '7.0', '7.1', '7.2', '7.3' ]
43- coverage : [ 'none' ]
44- include :
45- - php-version : 7.4
46- coverage : xdebug
44+ php-version : [ '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3' ]
4745
4846 steps :
4947 - name : Checkout
50- uses : actions/checkout@v3
48+ uses : actions/checkout@v4
5149
5250 - name : Install PHP
5351 uses : shivammathur/setup-php@v2
5452 with :
5553 php-version : ${{ matrix.php-version }}
54+ ini-values : error_reporting=E_ALL
5655 tools : composer:v2
57- coverage : " ${{ matrix.coverage }}"
56+ coverage : none
57+
58+ - name : Show the Composer configuration
59+ run : composer config --global --list
5860
5961 - name : Cache dependencies installed with composer
60- uses : actions/cache@v1
62+ uses : actions/cache@v4
6163 with :
6264 path : ~/.cache/composer
6365 key : php${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.json') }}
@@ -70,36 +72,27 @@ jobs:
7072 composer show;
7173
7274 - name : Run Tests
73- run : ./vendor/bin/phpunit --coverage-clover build/coverage/xml
74-
75- - name : Upload coverage results to Codacy
76- env :
77- CODACY_PROJECT_TOKEN : ${{ secrets.CODACY_PROJECT_TOKEN }}
78- if : " ${{ matrix.coverage != 'none' && env.CODACY_PROJECT_TOKEN != '' }}"
79- run : |
80- ./vendor/bin/codacycoverage clover build/coverage/xml
75+ run : ./vendor/bin/phpunit
8176
8277 static-analysis :
8378 name : Static Analysis
8479
85- runs-on : ubuntu-20 .04
80+ runs-on : ubuntu-22 .04
8681
8782 needs : [ php-lint ]
8883
8984 strategy :
9085 fail-fast : false
9186 matrix :
92- include :
93- - command : sniffer
94- php-version : 7.4
95- - command : fixer
96- php-version : 7.4
97- - command : stan
98- php-version : 7.4
87+ command :
88+ - fixer
89+ - stan
90+ php-version :
91+ - ' 8.3'
9992
10093 steps :
10194 - name : Checkout
102- uses : actions/checkout@v3
95+ uses : actions/checkout@v4
10396
10497 - name : Install PHP
10598 uses : shivammathur/setup-php@v2
@@ -108,8 +101,11 @@ jobs:
108101 tools : " composer:v2, phive"
109102 coverage : none
110103
104+ - name : Show the Composer configuration
105+ run : composer config --global --list
106+
111107 - name : Cache dependencies installed with composer
112- uses : actions/cache@v1
108+ uses : actions/cache@v4
113109 with :
114110 path : ~/.cache/composer
115111 key : php${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.json') }}
@@ -123,7 +119,7 @@ jobs:
123119
124120 - name : Install development tools
125121 run : |
126- phive --no-progress install --trust-gpg-keys BBAB5DF0A0D6672989CF1869E82B2FB314E9906E,A972B9ABB95D0B760B51442231C7E470E2138192,D32680D5957DC7116BE29C14CF1A108D0E7AE720
122+ phive --no-progress install --trust-gpg-keys BBAB5DF0A0D6672989CF1869E82B2FB314E9906E
127123
128124 - name : Run Command
129125 run : composer ci:php:${{ matrix.command }}
0 commit comments