77 runs-on : ubuntu-latest
88 strategy :
99 matrix :
10- php : [ 8.1, 8.2, 8.3 ]
10+ php : [ 8.1, 8.2, 8.3, 8.4 ]
1111
1212 steps :
1313 - uses : actions/checkout@v4
1414
1515 - name : Cache Composer dependencies
16- uses : actions/cache@v3
16+ uses : actions/cache@v4
1717 with :
1818 path : /tmp/composer-cache
1919 key : ${{ runner.os }}-${{ matrix.php }}-${{ hashFiles('**/composer.lock') }}
3737 needs : [ composer ]
3838 strategy :
3939 matrix :
40- php : [ 8.1, 8.2, 8.3 ]
40+ php : [ 8.1, 8.2, 8.3, 8.4 ]
4141
4242 outputs :
4343 coverage : ${{ steps.store-coverage.outputs.coverage_text }}
@@ -52,11 +52,10 @@ jobs:
5252 run : tar -xvf /tmp/github-actions/build.tar ./
5353
5454 - name : PHP Unit tests
55- uses : php-actions/phpunit@master
55+ uses : php-actions/phpunit@v4
5656 env :
5757 XDEBUG_MODE : cover
5858 with :
59- version : 10
6059 php_version : ${{ matrix.php }}
6160 php_extensions : xdebug
6261 coverage_text : _coverage/coverage.txt
7372 needs : [ phpunit ]
7473 strategy :
7574 matrix :
76- php : [ 8.1, 8.2, 8.3 ]
75+ php : [ 8.1, 8.2, 8.3, 8.4 ]
7776
7877 steps :
78+ - uses : actions/checkout@v4
79+
7980 - uses : actions/download-artifact@v4
8081 with :
8182 name : code-coverage-${{ matrix.php }}-${{ github.run_number }}
@@ -85,16 +86,14 @@ jobs:
8586 run : cat "_coverage/coverage.txt"
8687
8788 - name : Upload to Codecov
88- uses : codecov/codecov-action@v4
89- with :
90- token : ${{ secrets.CODECOV_TOKEN }}
89+ uses : codecov/codecov-action@v5
9190
9291 phpstan :
9392 runs-on : ubuntu-latest
9493 needs : [ composer ]
9594 strategy :
9695 matrix :
97- php : [ 8.1, 8.2, 8.3 ]
96+ php : [ 8.1, 8.2, 8.3, 8.4 ]
9897
9998 steps :
10099 - uses : actions/download-artifact@v4
@@ -110,14 +109,13 @@ jobs:
110109 with :
111110 php_version : ${{ matrix.php }}
112111 path : src/
113- level : 6
114112
115113 phpmd :
116114 runs-on : ubuntu-latest
117115 needs : [ composer ]
118116 strategy :
119117 matrix :
120- php : [ 8.1, 8.2, 8.3 ]
118+ php : [ 8.1, 8.2, 8.3, 8.4 ]
121119
122120 steps :
123121 - uses : actions/download-artifact@v4
@@ -141,7 +139,7 @@ jobs:
141139 needs : [ composer ]
142140 strategy :
143141 matrix :
144- php : [ 8.1, 8.2, 8.3 ]
142+ php : [ 8.1, 8.2, 8.3, 8.4 ]
145143
146144 steps :
147145 - uses : actions/download-artifact@v4
@@ -158,3 +156,18 @@ jobs:
158156 php_version : ${{ matrix.php }}
159157 path : src/
160158 standard : phpcs.xml
159+
160+ remove_old_artifacts :
161+ runs-on : ubuntu-latest
162+
163+ steps :
164+ - name : Remove old artifacts for prior workflow runs on this repository
165+ env :
166+ GH_TOKEN : ${{ github.token }}
167+ run : |
168+ gh api "/repos/${{ github.repository }}/actions/artifacts?name=build-artifact" | jq ".artifacts[] | select(.name | startswith(\"build-artifact\")) | .id" > artifact-id-list.txt
169+ while read id
170+ do
171+ echo -n "Deleting artifact ID $id ... "
172+ gh api --method DELETE /repos/${{ github.repository }}/actions/artifacts/$id && echo "Done"
173+ done <artifact-id-list.txt
0 commit comments