7
7
runs-on : ubuntu-latest
8
8
strategy :
9
9
matrix :
10
- php : [ 8.0 , 8.1 , 8.2 ]
10
+ php : [ 8.1 , 8.2 , 8.3 ]
11
11
12
12
steps :
13
- - uses : actions/checkout@v3
13
+ - uses : actions/checkout@v4
14
14
15
15
- name : Cache Composer dependencies
16
16
uses : actions/cache@v3
17
17
with :
18
18
path : /tmp/composer-cache
19
- key : ${{ runner.os }}-${{ hashFiles('**/composer.lock') }}
19
+ key : ${{ runner.os }}-${{ matrix.php }}-${{ hashFiles('**/composer.lock') }}
20
20
21
21
- name : Composer install
22
22
uses : php-actions/composer@v6
@@ -27,25 +27,25 @@ jobs:
27
27
run : mkdir /tmp/github-actions/ && tar -cvf /tmp/github-actions/build.tar ./
28
28
29
29
- name : Upload build archive for test runners
30
- uses : actions/upload-artifact@v3
30
+ uses : actions/upload-artifact@v4
31
31
with :
32
- name : build-artifact
32
+ name : build-artifact-${{ matrix.php }}
33
33
path : /tmp/github-actions
34
34
35
35
phpunit :
36
36
runs-on : ubuntu-latest
37
37
needs : [ composer ]
38
38
strategy :
39
39
matrix :
40
- php : [ 8.0 , 8.1 , 8.2 ]
40
+ php : [ 8.1 , 8.2 , 8.3 ]
41
41
42
42
outputs :
43
43
coverage : ${{ steps.store-coverage.outputs.coverage_text }}
44
44
45
45
steps :
46
- - uses : actions/download-artifact@v3
46
+ - uses : actions/download-artifact@v4
47
47
with :
48
- name : build-artifact
48
+ name : build-artifact-${{ matrix.php }}
49
49
path : /tmp/github-actions
50
50
51
51
- name : Extract build archive
@@ -56,46 +56,50 @@ jobs:
56
56
env :
57
57
XDEBUG_MODE : cover
58
58
with :
59
+ version : 10
59
60
php_version : ${{ matrix.php }}
60
61
php_extensions : xdebug
61
62
coverage_text : _coverage/coverage.txt
62
63
coverage_clover : _coverage/clover.xml
63
64
64
65
- name : Store coverage data
65
- uses : actions/upload-artifact@v3
66
+ uses : actions/upload-artifact@v4
66
67
with :
67
- name : code-coverage
68
+ name : code-coverage-${{ matrix.php }}-${{ github.run_number }}
68
69
path : _coverage
69
70
70
71
coverage :
71
72
runs-on : ubuntu-latest
72
73
needs : [ phpunit ]
74
+ strategy :
75
+ matrix :
76
+ php : [ 8.1, 8.2, 8.3 ]
73
77
74
78
steps :
75
- - uses : actions/checkout@v3
76
-
77
- - uses : actions/download-artifact@v3
79
+ - uses : actions/download-artifact@v4
78
80
with :
79
- name : code-coverage
81
+ name : code-coverage-${{ matrix.php }}-${{ github.run_number }}
80
82
path : _coverage
81
83
82
84
- name : Output coverage
83
85
run : cat "_coverage/coverage.txt"
84
86
85
87
- name : Upload to Codecov
86
- uses : codecov/codecov-action@v3
88
+ uses : codecov/codecov-action@v4
89
+ with :
90
+ token : ${{ secrets.CODECOV_TOKEN }}
87
91
88
92
phpstan :
89
93
runs-on : ubuntu-latest
90
94
needs : [ composer ]
91
95
strategy :
92
96
matrix :
93
- php : [ 8.0 , 8.1 , 8.2 ]
97
+ php : [ 8.1 , 8.2 , 8.3 ]
94
98
95
99
steps :
96
- - uses : actions/download-artifact@v3
100
+ - uses : actions/download-artifact@v4
97
101
with :
98
- name : build-artifact
102
+ name : build-artifact-${{ matrix.php }}
99
103
path : /tmp/github-actions
100
104
101
105
- name : Extract build archive
@@ -106,18 +110,19 @@ jobs:
106
110
with :
107
111
php_version : ${{ matrix.php }}
108
112
path : src/
113
+ level : 6
109
114
110
115
phpmd :
111
116
runs-on : ubuntu-latest
112
117
needs : [ composer ]
113
118
strategy :
114
119
matrix :
115
- php : [ 8.0 , 8.1 , 8.2 ]
120
+ php : [ 8.1 , 8.2 , 8.3 ]
116
121
117
122
steps :
118
- - uses : actions/download-artifact@v3
123
+ - uses : actions/download-artifact@v4
119
124
with :
120
- name : build-artifact
125
+ name : build-artifact-${{ matrix.php }}
121
126
path : /tmp/github-actions
122
127
123
128
- name : Extract build archive
@@ -136,12 +141,12 @@ jobs:
136
141
needs : [ composer ]
137
142
strategy :
138
143
matrix :
139
- php : [ 8.0 , 8.1 , 8.2 ]
144
+ php : [ 8.1 , 8.2 , 8.3 ]
140
145
141
146
steps :
142
- - uses : actions/download-artifact@v3
147
+ - uses : actions/download-artifact@v4
143
148
with :
144
- name : build-artifact
149
+ name : build-artifact-${{ matrix.php }}
145
150
path : /tmp/github-actions
146
151
147
152
- name : Extract build archive
@@ -153,18 +158,3 @@ jobs:
153
158
php_version : ${{ matrix.php }}
154
159
path : src/
155
160
standard : phpcs.xml
156
-
157
- remove_old_artifacts :
158
- runs-on : ubuntu-latest
159
-
160
- steps :
161
- - name : Remove old artifacts for prior workflow runs on this repository
162
- env :
163
- GH_TOKEN : ${{ github.token }}
164
- run : |
165
- gh api "/repos/${{ github.repository }}/actions/artifacts?name=build-artifact" | jq ".artifacts[] | select(.name == \"build-artifact\") | .id" > artifact-id-list.txt
166
- while read id
167
- do
168
- echo -n "Deleting artifact ID $id ... "
169
- gh api --method DELETE /repos/${{ github.repository }}/actions/artifacts/$id && echo "Done"
170
- done <artifact-id-list.txt
0 commit comments