11name : CI
22
3- on : [push]
3+ on :
4+ push :
5+ pull_request :
46
57jobs :
68 composer :
79 runs-on : ubuntu-latest
810 strategy :
911 matrix :
10- php : [ 8.2, 8.3 ]
12+ php : [ 8.1, 8. 2, 8.3, 8.4, 8.5 ]
1113
1214 steps :
13- - uses : actions/checkout@v4
15+ - uses : actions/checkout@v6
1416
1517 - name : Cache Composer dependencies
16- uses : actions/cache@v3
18+ uses : actions/cache@v5
1719 with :
1820 path : /tmp/composer-cache
1921 key : ${{ runner.os }}-${{ matrix.php }}-${{ hashFiles('**/composer.lock') }}
2224 uses : php-actions/composer@v6
2325 with :
2426 php_version : ${{ matrix.php }}
25- php_extensions : pcntl
2627
2728 - name : Archive build
28- run : mkdir /tmp/github-actions/ && tar -cvf /tmp/github-actions/build.tar ./
29+ run : mkdir /tmp/github-actions/ && tar --exclude=".git" - cvf /tmp/github-actions/build.tar ./
2930
3031 - name : Upload build archive for test runners
3132 uses : actions/upload-artifact@v4
3839 needs : [ composer ]
3940 strategy :
4041 matrix :
41- php : [ 8.2, 8.3 ]
42+ php : [ 8.1, 8. 2, 8.3, 8.4, 8.5 ]
4243
4344 outputs :
4445 coverage : ${{ steps.store-coverage.outputs.coverage_text }}
@@ -53,13 +54,12 @@ jobs:
5354 run : tar -xvf /tmp/github-actions/build.tar ./
5455
5556 - name : PHP Unit tests
56- uses : php-actions/phpunit@v3
57+ uses : php-actions/phpunit@v4
5758 env :
5859 XDEBUG_MODE : cover
5960 with :
60- version : 10
6161 php_version : ${{ matrix.php }}
62- php_extensions : xdebug pcntl
62+ php_extensions : xdebug
6363 coverage_text : _coverage/coverage.txt
6464 coverage_clover : _coverage/clover.xml
6565
7474 needs : [ phpunit ]
7575 strategy :
7676 matrix :
77- php : [ 8.2, 8.3 ]
77+ php : [ 8.1, 8. 2, 8.3, 8.4, 8.5 ]
7878
7979 steps :
80+ - uses : actions/checkout@v4
81+
8082 - uses : actions/download-artifact@v4
8183 with :
8284 name : code-coverage-${{ matrix.php }}-${{ github.run_number }}
8688 run : cat "_coverage/coverage.txt"
8789
8890 - name : Upload to Codecov
89- uses : codecov/codecov-action@v4
91+ uses : codecov/codecov-action@v5
9092 with :
9193 token : ${{ secrets.CODECOV_TOKEN }}
9294
9597 needs : [ composer ]
9698 strategy :
9799 matrix :
98- php : [ 8.2, 8.3 ]
100+ php : [ 8.1, 8. 2, 8.3, 8.4, 8.5 ]
99101
100102 steps :
101103 - uses : actions/download-artifact@v4
@@ -112,13 +114,14 @@ jobs:
112114 php_version : ${{ matrix.php }}
113115 path : src/
114116 level : 6
117+ memory_limit : 256M
115118
116119 phpmd :
117120 runs-on : ubuntu-latest
118121 needs : [ composer ]
119122 strategy :
120123 matrix :
121- php : [ 8.2, 8.3 ]
124+ php : [ 8.1, 8. 2, 8.3, 8.4, 8.5 ]
122125
123126 steps :
124127 - uses : actions/download-artifact@v4
@@ -142,7 +145,7 @@ jobs:
142145 needs : [ composer ]
143146 strategy :
144147 matrix :
145- php : [ 8.2, 8.3 ]
148+ php : [ 8.1, 8. 2, 8.3, 8.4, 8.5 ]
146149
147150 steps :
148151 - uses : actions/download-artifact@v4
@@ -163,12 +166,15 @@ jobs:
163166 remove_old_artifacts :
164167 runs-on : ubuntu-latest
165168
169+ permissions :
170+ actions : write
171+
166172 steps :
167173 - name : Remove old artifacts for prior workflow runs on this repository
168174 env :
169175 GH_TOKEN : ${{ github.token }}
170176 run : |
171- gh api "/repos/${{ github.repository }}/actions/artifacts?name=build-artifact " | jq ".artifacts[] | select(.name | startswith(\"build-artifact\")) | .id" > artifact-id-list.txt
177+ gh api "/repos/${{ github.repository }}/actions/artifacts" | jq ".artifacts[] | select(.name | startswith(\"build-artifact\")) | .id" > artifact-id-list.txt
172178 while read id
173179 do
174180 echo -n "Deleting artifact ID $id ... "
0 commit comments