11name : CI
22
3- on : [push]
3+ on :
4+ push :
5+ pull_request :
6+
7+ permissions :
8+ contents : read
9+ actions : read
410
511jobs :
612 composer :
713 runs-on : ubuntu-latest
814 strategy :
915 matrix :
10- php : [ 8.1 , 8.2 , 8.3 , 8.4 ]
16+ php : [ 8.2 , 8.3 , 8.4 , 8.5 ]
1117
1218 steps :
13- - uses : actions/checkout@v4
19+ - uses : actions/checkout@v6
1420
1521 - name : Cache Composer dependencies
16- uses : actions/cache@v4
22+ uses : actions/cache@v5
1723 with :
1824 path : /tmp/composer-cache
1925 key : ${{ runner.os }}-${{ matrix.php }}-${{ hashFiles('**/composer.lock') }}
@@ -22,22 +28,24 @@ jobs:
2228 uses : php-actions/composer@v6
2329 with :
2430 php_version : ${{ matrix.php }}
31+ php_extensions : pcntl
2532
2633 - name : Archive build
27- run : mkdir /tmp/github-actions/ && tar -cvf /tmp/github-actions/build.tar ./
34+ run : mkdir /tmp/github-actions/ && tar --exclude=".git" - cvf /tmp/github-actions/build.tar ./
2835
2936 - name : Upload build archive for test runners
3037 uses : actions/upload-artifact@v4
3138 with :
3239 name : build-artifact-${{ matrix.php }}
3340 path : /tmp/github-actions
41+ retention-days : 1
3442
3543 phpunit :
3644 runs-on : ubuntu-latest
3745 needs : [ composer ]
3846 strategy :
3947 matrix :
40- php : [ 8.1 , 8.2 , 8.3 , 8.4 ]
48+ php : [ 8.2 , 8.3 , 8.4 , 8.5 ]
4149
4250 outputs :
4351 coverage : ${{ steps.store-coverage.outputs.coverage_text }}
7280 needs : [ phpunit ]
7381 strategy :
7482 matrix :
75- php : [ 8.1 , 8.2 , 8.3 , 8.4 ]
83+ php : [ 8.2 , 8.3 , 8.4 , 8.5 ]
7684
7785 steps :
7886 - uses : actions/checkout@v4
@@ -87,13 +95,15 @@ jobs:
8795
8896 - name : Upload to Codecov
8997 uses : codecov/codecov-action@v5
98+ with :
99+ token : ${{ secrets.CODECOV_TOKEN }}
90100
91101 phpstan :
92102 runs-on : ubuntu-latest
93103 needs : [ composer ]
94104 strategy :
95105 matrix :
96- php : [ 8.1 , 8.2 , 8.3 , 8.4 ]
106+ php : [ 8.2 , 8.3 , 8.4 , 8.5 ]
97107
98108 steps :
99109 - uses : actions/download-artifact@v4
@@ -109,13 +119,15 @@ jobs:
109119 with :
110120 php_version : ${{ matrix.php }}
111121 path : src/
122+ level : 6
123+ memory_limit : 256M
112124
113125 phpmd :
114126 runs-on : ubuntu-latest
115127 needs : [ composer ]
116128 strategy :
117129 matrix :
118- php : [ 8.1 , 8.2 , 8.3 , 8.4 ]
130+ php : [ 8.2 , 8.3 , 8.4 , 8.5 ]
119131
120132 steps :
121133 - uses : actions/download-artifact@v4
@@ -139,7 +151,7 @@ jobs:
139151 needs : [ composer ]
140152 strategy :
141153 matrix :
142- php : [ 8.1 , 8.2 , 8.3 , 8.4 ]
154+ php : [ 8.2 , 8.3 , 8.4 , 8.5 ]
143155
144156 steps :
145157 - uses : actions/download-artifact@v4
@@ -156,18 +168,3 @@ jobs:
156168 php_version : ${{ matrix.php }}
157169 path : src/
158170 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