@@ -2,28 +2,47 @@ name: CI
2
2
3
3
on :
4
4
pull_request :
5
- paths-ignore : ["*.md"]
5
+ paths-ignore :
6
+ - *.md
6
7
push :
7
- paths-ignore : ["*.md"]
8
+ paths-ignore :
9
+ - *.md
8
10
9
11
jobs :
10
12
analysis :
13
+
14
+
11
15
runs-on : ubuntu-latest
16
+
17
+
18
+
12
19
strategy :
13
20
matrix :
14
- php : [8.3]
21
+ php : ['8.2', 8.3, '8.3', '8.4']
22
+
23
+
24
+
15
25
steps :
16
26
- uses : actions/checkout@v4
27
+
28
+
29
+
17
30
- name : Setup PHP
18
31
uses : shivammathur/setup-php@v2
19
32
with :
20
33
php-version : ${{ matrix.php }}
21
34
extensions : dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, intl, gd, exif, iconv
22
35
coverage : none
36
+
37
+
38
+
23
39
- name : Get Composer Cache Directory
24
40
id : composer-cache
25
41
run : |
26
42
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
43
+
44
+
45
+
27
46
- name : Cache composer dependencies
28
47
uses : actions/cache@v4
29
48
env :
@@ -33,30 +52,57 @@ jobs:
33
52
key : php-${{ matrix.php }}-build-${{ env.cache-name }}-${{ hashFiles('**/composer.json') }}
34
53
restore-keys : |
35
54
php-${{ matrix.php }}-build-${{ env.cache-name }}-
55
+
56
+
57
+
36
58
- name : Install composer dependencies
37
59
run : composer install --prefer-dist
60
+
61
+
62
+
38
63
- name : Run static analysis
39
64
run : composer analyse
65
+
40
66
test :
41
67
name : Test (PHP ${{ matrix.php }})
42
- needs : [analysis]
68
+
69
+
70
+ needs :
71
+ - analysis
72
+
73
+
43
74
runs-on : ubuntu-latest
75
+
76
+
77
+
44
78
strategy :
45
79
matrix :
46
80
php : [8.0, 8.1, 8.2]
81
+
82
+
83
+
47
84
steps :
48
85
- name : Checkout repository
49
86
uses : actions/checkout@v4
87
+
88
+
89
+
50
90
- name : Set up PHP
51
91
uses : shivammathur/setup-php@v2
52
92
with :
53
93
php-version : ${{ matrix.php }}
54
94
extensions : dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, intl, gd, exif, iconv
55
95
coverage : none
96
+
97
+
98
+
56
99
- name : Get Composer Cache Directory
57
100
id : composer-cache
58
101
run : |
59
102
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
103
+
104
+
105
+
60
106
- name : Cache composer dependencies
61
107
uses : actions/cache@v4
62
108
env :
@@ -66,41 +112,76 @@ jobs:
66
112
key : php-${{ matrix.php }}-build-${{ env.cache-name }}-${{ hashFiles('**/composer.json') }}
67
113
restore-keys : |
68
114
php-${{ matrix.php }}-build-${{ env.cache-name }}-
115
+
116
+
117
+
69
118
- name : Install composer dependencies
70
119
run : composer install --no-interaction --prefer-dist
120
+
121
+
122
+
71
123
- name : Run PHPUnit tests
72
124
run : vendor/bin/phpunit
125
+
73
126
test-coverage :
74
127
name : Test (PHP ${{ matrix.php }})
75
- needs : [analysis]
128
+
129
+
130
+ needs :
131
+ - analysis
132
+
133
+
76
134
runs-on : ubuntu-latest
135
+
136
+
137
+
77
138
strategy :
78
139
matrix :
79
- php : [8.3]
140
+ php : ['8.2', 8.3, '8.3', '8.4']
141
+
142
+
143
+
80
144
steps :
81
145
- name : Checkout repository
82
146
uses : actions/checkout@v4
147
+
148
+
149
+
83
150
- name : Set up PHP
84
151
uses : shivammathur/setup-php@v2
85
152
with :
86
153
php-version : ${{ matrix.php }}
87
154
extensions : dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, intl, gd, exif, iconv
155
+
156
+
157
+
88
158
- name : Get Composer Cache Directory
89
159
id : composer-cache
90
160
run : |
91
161
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
162
+
163
+
164
+
92
165
- name : Cache composer dependencies
93
166
uses : actions/cache@v4
94
167
env :
95
168
cache-name : eloquent-blameable-test
96
169
with :
97
170
path : ${{ steps.composer-cache.outputs.dir }}
98
171
key : php-${{ matrix.php }}-build-${{ env.cache-name }}-${{ hashFiles('**/composer.json') }}
99
- restore-keys : |
100
- php-${{ matrix.php }}-build-${{ env.cache-name }}-
172
+ restore-keys : php-${{ matrix.php }}-build-${{ env.cache-name }}-
173
+
174
+
175
+
101
176
- name : Install composer dependencies
102
177
run : composer install --no-interaction --prefer-dist
178
+
179
+
180
+
103
181
- name : Run PHPUnit tests and generate code coverage
104
182
run : vendor/bin/phpunit --coverage-clover=clover.xml
183
+
184
+
185
+
105
186
- name : Upload code coverage results
106
187
run : bash <(curl -s https://codecov.io/bash)
0 commit comments