7
7
runs-on : ubuntu-latest
8
8
strategy :
9
9
matrix :
10
- php : [ 8.2, 8.3 ]
10
+ php : [ 8.1, 8. 2, 8.3, 8.4 ]
11
11
12
12
steps :
13
- - uses : actions/checkout@v3
13
+ - uses : actions/checkout@v4
14
14
15
15
- name : Cache Composer dependencies
16
- uses : actions/cache@v3
16
+ uses : actions/cache@v4
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,32 +27,32 @@ 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.2, 8.3 ]
40
+ php : [ 8.1, 8. 2, 8.3, 8.4 ]
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
52
52
run : tar -xvf /tmp/github-actions/build.tar ./
53
53
54
54
- name : PHP Unit tests
55
- uses : php-actions/phpunit@v3
55
+ uses : php-actions/phpunit@v4
56
56
env :
57
57
XDEBUG_MODE : cover
58
58
with :
@@ -62,40 +62,43 @@ jobs:
62
62
coverage_clover : _coverage/clover.xml
63
63
64
64
- name : Store coverage data
65
- uses : actions/upload-artifact@v3
65
+ uses : actions/upload-artifact@v4
66
66
with :
67
- name : code-coverage
67
+ name : code-coverage-${{ matrix.php }}-${{ github.run_number }}
68
68
path : _coverage
69
69
70
70
coverage :
71
71
runs-on : ubuntu-latest
72
72
needs : [ phpunit ]
73
+ strategy :
74
+ matrix :
75
+ php : [ 8.1, 8.2, 8.3, 8.4 ]
73
76
74
77
steps :
75
- - uses : actions/checkout@v3
78
+ - uses : actions/checkout@v4
76
79
77
- - uses : actions/download-artifact@v3
80
+ - uses : actions/download-artifact@v4
78
81
with :
79
- name : code-coverage
82
+ name : code-coverage-${{ matrix.php }}-${{ github.run_number }}
80
83
path : _coverage
81
84
82
85
- name : Output coverage
83
86
run : cat "_coverage/coverage.txt"
84
87
85
88
- name : Upload to Codecov
86
- uses : codecov/codecov-action@v3
89
+ uses : codecov/codecov-action@v5
87
90
88
91
phpstan :
89
92
runs-on : ubuntu-latest
90
93
needs : [ composer ]
91
94
strategy :
92
95
matrix :
93
- php : [ 8.2, 8.3 ]
96
+ php : [ 8.1, 8. 2, 8.3, 8.4 ]
94
97
95
98
steps :
96
- - uses : actions/download-artifact@v3
99
+ - uses : actions/download-artifact@v4
97
100
with :
98
- name : build-artifact
101
+ name : build-artifact-${{ matrix.php }}
99
102
path : /tmp/github-actions
100
103
101
104
- name : Extract build archive
@@ -112,12 +115,12 @@ jobs:
112
115
needs : [ composer ]
113
116
strategy :
114
117
matrix :
115
- php : [ 8.2, 8.3 ]
118
+ php : [ 8.1, 8. 2, 8.3, 8.4 ]
116
119
117
120
steps :
118
- - uses : actions/download-artifact@v3
121
+ - uses : actions/download-artifact@v4
119
122
with :
120
- name : build-artifact
123
+ name : build-artifact-${{ matrix.php }}
121
124
path : /tmp/github-actions
122
125
123
126
- name : Extract build archive
@@ -136,12 +139,12 @@ jobs:
136
139
needs : [ composer ]
137
140
strategy :
138
141
matrix :
139
- php : [ 8.2, 8.3 ]
142
+ php : [ 8.1, 8. 2, 8.3, 8.4 ]
140
143
141
144
steps :
142
- - uses : actions/download-artifact@v3
145
+ - uses : actions/download-artifact@v4
143
146
with :
144
- name : build-artifact
147
+ name : build-artifact-${{ matrix.php }}
145
148
path : /tmp/github-actions
146
149
147
150
- name : Extract build archive
@@ -162,7 +165,7 @@ jobs:
162
165
env :
163
166
GH_TOKEN : ${{ github.token }}
164
167
run : |
165
- gh api "/repos/${{ github.repository }}/actions/artifacts?name=build-artifact" | jq ".artifacts[] | select(.name == \"build-artifact\") | .id" > artifact-id-list.txt
168
+ gh api "/repos/${{ github.repository }}/actions/artifacts?name=build-artifact" | jq ".artifacts[] | select(.name | startswith( \"build-artifact\") ) | .id" > artifact-id-list.txt
166
169
while read id
167
170
do
168
171
echo -n "Deleting artifact ID $id ... "
0 commit comments